Skip to content
Snippets Groups Projects
Commit ecfdf3e7 authored by Daniel Ratiu's avatar Daniel Ratiu
Browse files

a better solution

refs 1153
parent 206a81da
No related branches found
No related tags found
No related merge requests found
......@@ -26,6 +26,7 @@ import org.eclipse.ui.IEditorSite;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.part.EditorPart;
import org.fortiss.tooling.kernel.service.ICommandStackService;
import org.fortiss.tooling.kernel.service.ILibraryService;
import org.fortiss.tooling.kernel.ui.extension.IModelEditor;
import org.fortiss.tooling.kernel.ui.extension.IModelEditorBinding;
import org.fortiss.tooling.kernel.ui.extension.IModelElementHandler;
......@@ -40,7 +41,7 @@ import org.fortiss.tooling.kernel.ui.internal.editor.ModelElementEditorInput;
* @author hoelzlf
* @author $Author$
* @version $Rev$
* @ConQAT.Rating GREEN Hash: 2E53286498C8CAEC1E65A31557449118
* @ConQAT.Rating YELLOW Hash: 9788EE38CFBA0BEE3DC10A60A374AF25
*/
public abstract class EditorBase<T extends EObject> extends EditorPart implements
IActionContributingEditor, IModelEditor<T> {
......@@ -162,6 +163,6 @@ public abstract class EditorBase<T extends EObject> extends EditorPart implement
/** {@inheritDoc} */
@Override
public boolean enableLibraryView() {
return true;
return !ILibraryService.INSTANCE.isLibraryElementShadow(editedObject);
}
}
......@@ -39,7 +39,6 @@ import org.eclipse.ui.dialogs.PatternFilter;
import org.eclipse.ui.part.ViewPart;
import org.fortiss.tooling.kernel.extension.data.Prototype;
import org.fortiss.tooling.kernel.extension.data.PrototypeCategory;
import org.fortiss.tooling.kernel.service.ILibraryService;
import org.fortiss.tooling.kernel.service.IPrototypeService;
import org.fortiss.tooling.kernel.ui.extension.IModelElementHandler;
import org.fortiss.tooling.kernel.ui.extension.base.EditorBase;
......@@ -54,7 +53,7 @@ import org.fortiss.tooling.kernel.ui.service.IModelElementHandlerService;
* @author eder
* @author $Author: hoelzl $
* @version $Rev: 18709 $
* @ConQAT.Rating YELLOW Hash: 5BA45B05325FF0C8C955FD593072FF56
* @ConQAT.Rating YELLOW Hash: 39E9DA9C8ED720A9B2BF2E8CF1F59132
*/
public class LibraryView extends ViewPart {
......@@ -134,11 +133,9 @@ public class LibraryView extends ViewPart {
EditorBase<? extends EObject> editorBase = (EditorBase<? extends EObject>)editor;
containerObject = editorBase.getEditedObject();
if(!ILibraryService.INSTANCE.isLibraryElementShadow(containerObject)) {
for(Class<? extends EObject> clazz : editorBase.getVisibleEObjectTypes()) {
supportedBaseClasses.addAll(IPrototypeService.INSTANCE
.getComposablePrototypes(clazz));
}
for(Class<? extends EObject> clazz : editorBase.getVisibleEObjectTypes()) {
supportedBaseClasses.addAll(IPrototypeService.INSTANCE
.getComposablePrototypes(clazz));
}
} else {
containerObject = null;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment