Commit bce87b7 1 parent cf01327 commit bce87b7 Copy full SHA for bce87b7
File tree 3 files changed +7
-7
lines changed
com.archimatetool.editor/src/com/archimatetool/editor
3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 17
17
import org .eclipse .ui .actions .RetargetAction ;
18
18
19
19
import com .archimatetool .editor .diagram .commands .TextAlignmentCommand ;
20
- import com .archimatetool .editor .ui .factory .IObjectUIProvider ;
20
+ import com .archimatetool .editor .ui .factory .IGraphicalObjectUIProvider ;
21
21
import com .archimatetool .editor .ui .factory .ObjectUIFactory ;
22
22
import com .archimatetool .model .IArchimatePackage ;
23
23
import com .archimatetool .model .ILockable ;
@@ -117,7 +117,7 @@ private List<ITextAlignment> getValidSelectedObjects() {
117
117
for (Object object : getSelectedObjects ()) {
118
118
if (object instanceof EditPart editPart && editPart .getModel () instanceof ITextAlignment textAlignmentObject
119
119
&& !(textAlignmentObject instanceof ILockable lockable && lockable .isLocked ())
120
- && ObjectUIFactory .INSTANCE .getProvider (textAlignmentObject ) instanceof IObjectUIProvider provider
120
+ && ObjectUIFactory .INSTANCE .getProvider (textAlignmentObject ) instanceof IGraphicalObjectUIProvider provider
121
121
&& provider .shouldExposeFeature (IArchimatePackage .Literals .TEXT_ALIGNMENT__TEXT_ALIGNMENT .getName ())) {
122
122
list .add (textAlignmentObject );
123
123
}
Original file line number Diff line number Diff line change 17
17
import org .eclipse .ui .actions .RetargetAction ;
18
18
19
19
import com .archimatetool .editor .diagram .commands .TextPositionCommand ;
20
- import com .archimatetool .editor .ui .factory .IObjectUIProvider ;
20
+ import com .archimatetool .editor .ui .factory .IGraphicalObjectUIProvider ;
21
21
import com .archimatetool .editor .ui .factory .ObjectUIFactory ;
22
22
import com .archimatetool .model .IArchimatePackage ;
23
23
import com .archimatetool .model .ILockable ;
@@ -117,7 +117,7 @@ private List<ITextPosition> getValidSelectedObjects() {
117
117
for (Object object : getSelectedObjects ()) {
118
118
if (object instanceof EditPart editPart && editPart .getModel () instanceof ITextPosition textPositionObject
119
119
&& !(textPositionObject instanceof ILockable lockable && lockable .isLocked ())
120
- && ObjectUIFactory .INSTANCE .getProvider (textPositionObject ) instanceof IObjectUIProvider provider
120
+ && ObjectUIFactory .INSTANCE .getProvider (textPositionObject ) instanceof IGraphicalObjectUIProvider provider
121
121
&& provider .shouldExposeFeature (IArchimatePackage .Literals .TEXT_POSITION__TEXT_POSITION .getName ())) {
122
122
list .add (textPositionObject );
123
123
}
Original file line number Diff line number Diff line change @@ -124,14 +124,14 @@ private boolean doSync() {
124
124
}
125
125
126
126
/**
127
- * Update with the last known selection
127
+ * Update with the last known selections
128
128
*/
129
129
private void updateSelection () {
130
130
// In this case we have created a new TreeViewer and synchroniser, so create a new selection event
131
131
if (lastSelectionEvent == null ) {
132
132
IEditorPart activeEditor = PlatformUI .getWorkbench ().getActiveWorkbenchWindow ().getActivePage ().getActiveEditor ();
133
- if (activeEditor instanceof IDiagramModelEditor editor && editor .getGraphicalViewer () instanceof GraphicalViewer viewer ) { // check this is not a zombie editor part
134
- selectionChanged (new SelectionChangedEvent (viewer , viewer .getSelection ()));
133
+ if (activeEditor instanceof IDiagramModelEditor editor && editor .getGraphicalViewer () != null ) { // check this is not a zombie editor part
134
+ selectionChanged (new SelectionChangedEvent (editor . getGraphicalViewer (), editor . getGraphicalViewer () .getSelection ()));
135
135
}
136
136
}
137
137
else {
You can’t perform that action at this time.
0 commit comments