Skip to content
Snippets Groups Projects
Commit 3e0fa3a7 authored by Florian Hölzl's avatar Florian Hölzl
Browse files

cleanup of kernel UI classes => YELLOW

parent 3171d5d0
No related branches found
No related tags found
No related merge requests found
Showing
with 61 additions and 49 deletions
......@@ -38,7 +38,7 @@ import org.eclipse.swt.dnd.TransferData;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Menu;
import org.fortiss.tooling.kernel.service.IElementCompositorService;
import org.fortiss.tooling.kernel.ui.base.EditorBase;
import org.fortiss.tooling.kernel.ui.extension.base.EditorBase;
import org.fortiss.tooling.kernel.ui.util.DragAndDropUtils;
import org.fortiss.tooling.kernel.ui.util.EObjectSelectionUtils;
......
......@@ -42,7 +42,7 @@ import org.fortiss.tooling.kernel.service.IPersistencyService;
* @ConQAT.Rating YELLOW Hash: 63FF468A2D042586A22495828A0798EF
*/
public abstract class EditorBase<T extends EObject> extends
org.fortiss.tooling.kernel.ui.base.EditorBase<T> {
org.fortiss.tooling.kernel.ui.extension.base.EditorBase<T> {
/** The edit domain (used e.g. for managing the command stack). */
private final EditDomain editDomain = new DefaultEditDomain(this);
......
......@@ -24,7 +24,7 @@ import org.eclipse.gef.editparts.AbstractConnectionEditPart;
import org.fortiss.tooling.base.model.element.IConnection;
import org.fortiss.tooling.base.model.layout.ILayoutedModelElement;
import org.fortiss.tooling.kernel.ui.extension.IModelElementHandler;
import org.fortiss.tooling.kernel.ui.service.IModelElementService;
import org.fortiss.tooling.kernel.ui.service.IModelElementHandlerService;
/**
* Base class for graphical connection edit parts.
......@@ -62,7 +62,7 @@ public abstract class GraphicalConnectionEditPartBase<T extends ILayoutedModelEl
protected GraphicalConnectionEditPartBase(T modelElement) {
this.modelElement = modelElement;
setModel(modelElement);
this.modelElementHandler = (IModelElementHandler<T>) IModelElementService.INSTANCE
this.modelElementHandler = (IModelElementHandler<T>) IModelElementHandlerService.INSTANCE
.getModelElementHandler(modelElement);
}
......
......@@ -23,7 +23,7 @@ import org.eclipse.emf.common.notify.impl.AdapterImpl;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.gef.editparts.AbstractGraphicalEditPart;
import org.fortiss.tooling.kernel.ui.extension.IModelElementHandler;
import org.fortiss.tooling.kernel.ui.service.IModelElementService;
import org.fortiss.tooling.kernel.ui.service.IModelElementHandlerService;
/**
* The base class for all graphical edit parts.
......@@ -65,7 +65,7 @@ public abstract class GraphicalEditPartBase<T extends EObject> extends
this.modelElement = modelElement;
setModel(modelElement);
this.modelElementHandler = (IModelElementHandler<T>) IModelElementService.INSTANCE
this.modelElementHandler = (IModelElementHandler<T>) IModelElementHandlerService.INSTANCE
.getModelElementHandler(modelElement);
}
......
......@@ -34,8 +34,8 @@ import org.fortiss.tooling.base.ui.editpart.policy.RemoveEditPolicy;
import org.fortiss.tooling.base.ui.layout.constants.RecommendedLayoutConstants;
import org.fortiss.tooling.base.ui.layout.util.LayoutDataUtils;
import org.fortiss.tooling.kernel.model.INamedCommentedElement;
import org.fortiss.tooling.kernel.ui.service.IEditorService;
import org.fortiss.tooling.kernel.ui.service.IModelElementService;
import org.fortiss.tooling.kernel.ui.service.IModelEditorBindingService;
import org.fortiss.tooling.kernel.ui.service.IModelElementHandlerService;
/**
* The base class for graphical edit parts which encapsulate nodes (i.e. the
......@@ -68,7 +68,7 @@ public abstract class NodeEditPartBase<T extends ILayoutedModelElement & INamedC
nameLabel.setTextAlignment(PositionConstants.LEFT
| PositionConstants.TOP);
nameLabel.setTextPlacement(PositionConstants.EAST);
nameLabel.setIcon(IModelElementService.INSTANCE.getModelElementHandler(
nameLabel.setIcon(IModelElementHandlerService.INSTANCE.getModelElementHandler(
modelElement).getIcon());
}
......@@ -138,7 +138,7 @@ public abstract class NodeEditPartBase<T extends ILayoutedModelElement & INamedC
@Override
public void performRequest(Request req) {
if (req.getType() == RequestConstants.REQ_OPEN) {
IEditorService.INSTANCE.openInEditor(modelElement);
IModelEditorBindingService.INSTANCE.openInEditor(modelElement);
}
super.performRequest(req);
}
......
......@@ -17,9 +17,9 @@ Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-Vendor: fortiss
Export-Package: org.fortiss.tooling.kernel.ui,
org.fortiss.tooling.kernel.ui.base,
org.fortiss.tooling.kernel.ui.databinding,
org.fortiss.tooling.kernel.ui.extension,
org.fortiss.tooling.kernel.ui.extension.base,
org.fortiss.tooling.kernel.ui.listener,
org.fortiss.tooling.kernel.ui.service,
org.fortiss.tooling.kernel.ui.util
......@@ -38,7 +38,7 @@ import org.fortiss.tooling.kernel.service.ICommandStackService;
* @author hummel
* @author $Author$
* @version $Rev$
* @ConQAT.Rating GREEN Hash: 7D915ADC82815E040E4685528FED4C7E
* @ConQAT.Rating YELLOW Hash: 233B0C84A966B0F5D3D83EFBBA1DFC60
*/
public class EObjectObservableValue extends AbstractObservableValue {
......
......@@ -26,12 +26,14 @@ import org.fortiss.tooling.kernel.ui.service.IContextMenuService;
* Classes implementing this interface contribute custom menu entries or
* submenus to the context menu provided by the {@link IContextMenuService}.
*
* @see IContextMenuService
*
* @author hoelzlf
* @author $Author$
* @version $Rev$
* @ConQAT.Rating GREEN Hash: 38606F3B8E5D282EEB2669C7C458110B
* @ConQAT.Rating YELLOW Hash: 2984F071E212C448CD00B46F3C8029C9
*/
public interface ICustomMenuContributor {
public interface IContextMenuContributor {
/** Returns the contributed items, i.e., actions or menus. */
List<IContributionItem> getContributedItems();
......
......@@ -21,16 +21,19 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.gef.EditPartFactory;
import org.fortiss.tooling.kernel.service.base.EObjectAwareServiceBase;
import org.fortiss.tooling.kernel.service.base.IEObjectAware;
import org.fortiss.tooling.kernel.ui.service.IEditPartFactoryService;
/**
* This is a wrapper interface for {@link EditPartFactory}. It is necessary in
* order to use {@link IEObjectAware} and the {@link EObjectAwareServiceBase}
* implementation.
* This is a wrapper interface for {@link EditPartFactory} from the GEF
* framework. It is necessary in order to use {@link IEObjectAware} and the
* {@link EObjectAwareServiceBase} implementation.
*
* @see IEditPartFactoryService
*
* @author hoelzlf
* @author $Author$
* @version $Rev$
* @ConQAT.Rating GREEN Hash: 92C6AEF3682C444DF19067D99C1071F0
* @ConQAT.Rating YELLOW Hash: 90613DA48AFAB8C26E86A146A85EE5E8
*/
public interface IEditPartFactory<T extends EObject> extends IEObjectAware<T>,
EditPartFactory {
......
......@@ -20,7 +20,7 @@ package org.fortiss.tooling.kernel.ui.extension;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.ui.IEditorPart;
import org.fortiss.tooling.kernel.service.base.IEObjectAware;
import org.fortiss.tooling.kernel.ui.service.IEditorService;
import org.fortiss.tooling.kernel.ui.service.IModelEditorBindingService;
/**
* Interface for editor bindings. An editor binding a defines a model element
......@@ -30,15 +30,18 @@ import org.fortiss.tooling.kernel.ui.service.IEditorService;
* <P>
* Each editor provided by some binding becomes part of an Eclipse multi-page
* editor. Its page carries the name delivered by {@link #getLabel()}. The
* {@link IEditorService} sorts the provided editors according to their priority
* returned by {@link #getPriority()} with higher values having lower priority.
* {@link IModelEditorBindingService} sorts the provided editors according to their
* priority returned by {@link #getPriority()} with higher values having lower
* priority.
*
* @see IModelEditorBindingService
*
* @author hoelzl
* @author $Author$
* @version $Rev$
* @ConQAT.Rating GREEN Hash: 2E2D48641B06DA048E64F598FF55F920
* @ConQAT.Rating YELLOW Hash: 3FE3F20D486787909FAB7F61B8BDEE02
*/
public interface IEditorBinding<T extends EObject> extends
public interface IModelEditorBinding<T extends EObject> extends
IEObjectAware<EObject> {
/** Returns the class of the editor registered by this binding. */
......
......@@ -23,20 +23,22 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.swt.graphics.Image;
import org.fortiss.tooling.kernel.service.base.IEObjectAware;
import org.fortiss.tooling.kernel.ui.base.ModelElementHandlerBase;
import org.fortiss.tooling.kernel.ui.base.NamedCommentedModelElementHandlerBase;
import org.fortiss.tooling.kernel.ui.extension.base.ModelElementHandlerBase;
import org.fortiss.tooling.kernel.ui.extension.base.NamedCommentedModelElementHandlerBase;
import org.fortiss.tooling.kernel.ui.service.IModelElementHandlerService;
/**
* A model element handler provides information about a specific type of model
* elements like name, description, icon and certain kinds of sub-elements.
*
* @see IModelElementHandlerService
* @see ModelElementHandlerBase
* @see NamedCommentedModelElementHandlerBase
*
* @author hoelzl
* @author $Author$
* @version $Rev$
* @ConQAT.Rating GREEN Hash: 519287421D1B11A94ADA4E0EC73D2F39
* @ConQAT.Rating YELLOW Hash: 9BF10C7A11329EEEF4DD559459B372AA
*/
public interface IModelElementHandler<T extends EObject> extends
IEObjectAware<T> {
......
......@@ -15,7 +15,7 @@ $Id$
| See the License for the specific language governing permissions and |
| limitations under the License. |
+--------------------------------------------------------------------------*/
package org.fortiss.tooling.kernel.ui.base;
package org.fortiss.tooling.kernel.ui.extension.base;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.jface.action.Action;
......@@ -27,7 +27,7 @@ import org.eclipse.jface.resource.ImageDescriptor;
* @author hoelzlf
* @author $Author$
* @version $Rev$
* @ConQAT.Rating GREEN Hash: 827FFC915A61A58BA1E8D6A70D51D197
* @ConQAT.Rating YELLOW Hash: 39A7CCEBD43D310CCB0F78BF6714E3AE
*/
public abstract class EObjectActionBase extends Action {
......
......@@ -15,7 +15,7 @@ $Id$
| See the License for the specific language governing permissions and |
| limitations under the License. |
+--------------------------------------------------------------------------*/
package org.fortiss.tooling.kernel.ui.base;
package org.fortiss.tooling.kernel.ui.extension.base;
import org.eclipse.core.databinding.DataBindingContext;
import org.eclipse.core.runtime.IProgressMonitor;
......@@ -26,19 +26,19 @@ 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.ui.extension.IActionContributingEditor;
import org.fortiss.tooling.kernel.ui.extension.IEditorBinding;
import org.fortiss.tooling.kernel.ui.extension.IModelEditorBinding;
import org.fortiss.tooling.kernel.ui.extension.IModelElementHandler;
import org.fortiss.tooling.kernel.ui.internal.editor.IActionContributingEditor;
import org.fortiss.tooling.kernel.ui.internal.editor.ModelElementEditorInput;
/**
* Base implementation of model element editors returned by
* {@link IEditorBinding}s.
* {@link IModelEditorBinding}s.
*
* @author hoelzlf
* @author $Author$
* @version $Rev$
* @ConQAT.Rating GREEN Hash: 73A4C3200D46DC571C694AD3A5B811BA
* @ConQAT.Rating YELLOW Hash: 0D820E78C649FDE8BC6DCC813E976C49
*/
public abstract class EditorBase<T extends EObject> extends EditorPart
implements IActionContributingEditor {
......
......@@ -15,7 +15,7 @@ $Id$
| See the License for the specific language governing permissions and |
| limitations under the License. |
+--------------------------------------------------------------------------*/
package org.fortiss.tooling.kernel.ui.base;
package org.fortiss.tooling.kernel.ui.extension.base;
import java.util.Collections;
import java.util.List;
......@@ -35,7 +35,7 @@ import org.fortiss.tooling.kernel.ui.extension.IModelElementHandler;
* @author hoelzlf
* @author $Author$
* @version $Rev$
* @ConQAT.Rating GREEN Hash: 285F29B04538144A5F3A5C3E53F72095
* @ConQAT.Rating YELLOW Hash: 2B44F0C8FCD18922695E7F55F406155A
*/
public abstract class ModelElementHandlerBase<T extends EObject> implements
IModelElementHandler<T> {
......
......@@ -15,7 +15,7 @@ $Id$
| See the License for the specific language governing permissions and |
| limitations under the License. |
+--------------------------------------------------------------------------*/
package org.fortiss.tooling.kernel.ui.base;
package org.fortiss.tooling.kernel.ui.extension.base;
import org.fortiss.tooling.kernel.model.INamedCommentedElement;
import org.fortiss.tooling.kernel.ui.extension.IModelElementHandler;
......@@ -27,7 +27,7 @@ import org.fortiss.tooling.kernel.ui.extension.IModelElementHandler;
* @author hoelzlf
* @author $Author$
* @version $Rev$
* @ConQAT.Rating GREEN Hash: BAD6146F064C56919E4CB05338327D32
* @ConQAT.Rating YELLOW Hash: CF323D41B59E68C2B08A21562222EE67
*/
public abstract class NamedCommentedModelElementHandlerBase<T extends INamedCommentedElement>
extends ModelElementHandlerBase<T> {
......
......@@ -15,7 +15,7 @@ $Id$
| See the License for the specific language governing permissions and |
| limitations under the License. |
+--------------------------------------------------------------------------*/
package org.fortiss.tooling.kernel.ui.base;
package org.fortiss.tooling.kernel.ui.extension.base;
import org.eclipse.core.databinding.DataBindingContext;
import org.eclipse.gef.EditPart;
......@@ -42,7 +42,7 @@ import org.fortiss.tooling.kernel.ui.util.DataBindingUtils;
* @author hoelzl
* @author $Author$
* @version $Rev$
* @ConQAT.Rating GREEN Hash: 6DF3091D1AF3953B2611F9A7C36F7793
* @ConQAT.Rating YELLOW Hash: D5B6D00C04A15A9C865F846631FA082B
*/
public abstract class PropertySectionBase extends AbstractPropertySection {
......
<!--
$Id$
@version $Rev$
@ConQAT.Rating GREEN Hash: B7912AFB4649A41D402C92E20A4A7412
@ConQAT.Rating YELLOW Hash: 8DA8330C731AF1130EEDFAF1CAE4CE2E
-->
<body>
Abstract base implementations for the kernel UI extensions.
......
<!--
$Id$
@version $Rev$
@ConQAT.Rating YELLOW Hash: 46EFE84BB050D523DAA487E9A233F53F
@ConQAT.Rating YELLOW Hash: A26A1F4CB563EEDFD226625507690733
-->
<body>
Interface definitions for extension classes of kernel UI extension points.
@TODO: are all these interfaces corresponding to an extension point?
<P>
Each interface corresponds to one extendable service from the <code>kernel.ui.service</code> package
and therefore to one extension point schema definition.
</body>
......@@ -31,7 +31,7 @@ import org.fortiss.tooling.kernel.listener.IPersistencyServiceListener;
import org.fortiss.tooling.kernel.service.ICommandStackService;
import org.fortiss.tooling.kernel.service.IElementCompositorService;
import org.fortiss.tooling.kernel.service.IPersistencyService;
import org.fortiss.tooling.kernel.ui.base.EObjectActionBase;
import org.fortiss.tooling.kernel.ui.extension.base.EObjectActionBase;
import org.fortiss.tooling.kernel.ui.service.IActionService;
import org.fortiss.tooling.kernel.ui.util.EObjectSelectionUtils;
......@@ -41,7 +41,7 @@ import org.fortiss.tooling.kernel.ui.util.EObjectSelectionUtils;
* @author hoelzlf
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash: 0DEA10AF5172CF62CC2C422274B84220
* @ConQAT.Rating RED Hash: F3C8B78E9226F14E8525172266DE08DB
*/
public class ActionService implements IActionService,
IPersistencyServiceListener, CommandStackListener {
......
......@@ -23,7 +23,7 @@ import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.MenuManager;
import org.eclipse.jface.action.Separator;
import org.eclipse.ui.IWorkbenchActionConstants;
import org.fortiss.tooling.kernel.ui.extension.ICustomMenuContributor;
import org.fortiss.tooling.kernel.ui.extension.IContextMenuContributor;
import org.fortiss.tooling.kernel.ui.service.IActionService;
import org.fortiss.tooling.kernel.ui.service.IContextMenuService;
......@@ -33,14 +33,14 @@ import org.fortiss.tooling.kernel.ui.service.IContextMenuService;
* @author hoelzl
* @author $Author$
* @version $Rev$
* @ConQAT.Rating RED Hash: 28C94C43A9B4498417187CD8F0EFBC57
* @ConQAT.Rating RED Hash: E98FC60498F584BDB4950E792DB3B708
*/
public class ContextMenuService implements IContextMenuService {
/** {@inheritDoc} */
@Override
public MenuManager createDefaultContextMenu(
ICustomMenuContributor menuContributor) {
IContextMenuContributor menuContributor) {
MenuManager menuManager = new MenuManager("#PopupMenu");
menuManager.setRemoveAllWhenShown(true);
menuManager.addMenuListener(new MenuCreator(menuContributor));
......@@ -56,10 +56,10 @@ public class ContextMenuService implements IContextMenuService {
private static class MenuCreator implements IMenuListener {
/** Stores the custom menu contributor. */
private final ICustomMenuContributor contributor;
private final IContextMenuContributor contributor;
/** Constructor. */
public MenuCreator(ICustomMenuContributor contributor) {
public MenuCreator(IContextMenuContributor contributor) {
this.contributor = contributor;
}
......
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