Ver código fonte

Revert "#767 add possibility to replace sct diagram editors outline"

This reverts commit 0845a045d52b297069a6af75b3bae2ab4226f138.
Johannes Dicks 9 anos atrás
pai
commit
7c7c47bdbb

+ 0 - 9
plugins/org.yakindu.sct.domain.generic/src/org/yakindu/sct/domain/generic/modules/GenericEditorModule.java

@@ -14,9 +14,7 @@ import org.eclipse.xtext.service.AbstractGenericModule;
 import org.yakindu.sct.refactoring.proposals.RefactoringProposalProvider;
 import org.yakindu.sct.ui.editor.editor.proposals.SmartEditProposalProvider;
 import org.yakindu.sct.ui.editor.proposals.IEditProposalProvider;
-import org.yakindu.sct.ui.editor.providers.DefaultSCTOutlineFactory;
 import org.yakindu.sct.ui.editor.providers.DefaultSCTPaletteFactory;
-import org.yakindu.sct.ui.editor.providers.ISCTOutlineFactory;
 import org.yakindu.sct.ui.editor.providers.ISCTPaletteFactory;
 
 import com.google.inject.Binder;
@@ -26,8 +24,6 @@ import com.google.inject.multibindings.Multibinder;
  * This module registers services that are intended to be used by the graphical editor.
  * 
  * @author terfloth
- * @author muelder - add palette factory
- * @author dicks - add outline factory
  *
  */
 public class GenericEditorModule extends AbstractGenericModule {
@@ -43,10 +39,5 @@ public class GenericEditorModule extends AbstractGenericModule {
 	public Class<? extends ISCTPaletteFactory> bindISCTPaletteFactory() {
 		return DefaultSCTPaletteFactory.class;
 	}
-	public Class<? extends ISCTOutlineFactory> bindISCTOutlineFactory() {
-		return DefaultSCTOutlineFactory.class;
-	}
-	
-	
 	
 }

+ 2 - 19
plugins/org.yakindu.sct.ui.editor/src/org/yakindu/sct/ui/editor/editor/StatechartDiagramEditor.java

@@ -36,7 +36,6 @@ import org.eclipse.ui.PartInitException;
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.help.IWorkbenchHelpSystem;
 import org.eclipse.ui.ide.IGotoMarker;
-import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
 import org.eclipse.xtext.ui.XtextProjectHelper;
 import org.yakindu.base.xtext.utils.gmf.resource.DirtyStateListener;
 import org.yakindu.sct.domain.extension.DomainRegistry;
@@ -47,13 +46,13 @@ import org.yakindu.sct.ui.editor.DiagramActivator;
 import org.yakindu.sct.ui.editor.partitioning.DiagramPartitioningEditor;
 import org.yakindu.sct.ui.editor.partitioning.DiagramPartitioningUtil;
 import org.yakindu.sct.ui.editor.proposals.ContentProposalViewerKeyHandler;
-import org.yakindu.sct.ui.editor.providers.ISCTOutlineFactory;
 import org.yakindu.sct.ui.editor.utils.HelpContextIds;
 import org.yakindu.sct.ui.editor.validation.SCTValidationJob;
 
 import com.google.inject.Injector;
 
 /**
+ * 
  * @author andreas muelder - Initial contribution and API
  * @author martin esser
  */
@@ -96,17 +95,6 @@ public class StatechartDiagramEditor extends DiagramPartitioningEditor implement
 		super(true);
 	}
 
-	@Override
-	public Object getAdapter(@SuppressWarnings("rawtypes") Class type) {
-		if (IContentOutlinePage.class.equals(type)) {
-			IDomainInjectorProvider injectorProvider = DomainRegistry.getDomainDescriptor(getDiagram().getElement())
-					.getDomainInjectorProvider();
-			ISCTOutlineFactory instance = injectorProvider.getEditorInjector().getInstance(ISCTOutlineFactory.class);
-			return instance.createOutline(this);
-		}
-		return super.getAdapter(type);
-	}
-
 	@Override
 	public void init(IEditorSite site, IEditorInput input) throws PartInitException {
 		super.init(site, input);
@@ -219,14 +207,9 @@ public class StatechartDiagramEditor extends DiagramPartitioningEditor implement
 		}
 		super.dispose();
 	}
-
+	
 	@Override
 	protected int getInitialPaletteSize() {
 		return 175;
 	}
-
-	public IContentOutlinePage getDefaultOutline() {
-		return (IContentOutlinePage) super.getAdapter(IContentOutlinePage.class);
-	}
-
 }

+ 0 - 29
plugins/org.yakindu.sct.ui.editor/src/org/yakindu/sct/ui/editor/providers/DefaultSCTOutlineFactory.java

@@ -1,29 +0,0 @@
-/**
- * Copyright (c) 2016 committers of YAKINDU and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * Contributors:
- * 	committers of YAKINDU - initial API and implementation
- * 
- */
-package org.yakindu.sct.ui.editor.providers;
-
-import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
-import org.yakindu.sct.ui.editor.editor.StatechartDiagramEditor;
-
-/**
- * Provide default implementations for the gef based StatechartDiagram editors outline. 
- * 
- * @author Johannes Dicks - Initial contribution and API
- *
- */
-public class DefaultSCTOutlineFactory implements ISCTOutlineFactory {
-
-	@Override
-	public IContentOutlinePage createOutline(StatechartDiagramEditor statechartDiagramEditor) {
-		return statechartDiagramEditor.getDefaultOutline();
-	}
-
-}

+ 0 - 31
plugins/org.yakindu.sct.ui.editor/src/org/yakindu/sct/ui/editor/providers/ISCTOutlineFactory.java

@@ -1,31 +0,0 @@
-/**
- * Copyright (c) 2016 committers of YAKINDU and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * Contributors:
- * 	committers of YAKINDU - initial API and implementation
- * 
- */
-package org.yakindu.sct.ui.editor.providers;
-
-import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
-import org.yakindu.sct.ui.editor.editor.StatechartDiagramEditor;
-
-/**
- * 
- * @author Johannes Dicks - Initial contribution and API
- *
- */
-public interface ISCTOutlineFactory {
-	
-	/**
-	 * Creates an implementation of an {@link IContentOutlinePage} which will be shown if the editor is active.
-	 * 
-	 * @param statechartDiagramEditor current editors instance
-	 * @return an instance of an outline
-	 */
-	IContentOutlinePage createOutline(StatechartDiagramEditor statechartDiagramEditor);
-
-}