Skip to content
Snippets Groups Projects
Commit f84e4791 authored by Christoph Döbber's avatar Christoph Döbber
Browse files

reviewed portion of tooling.base.ui

refs 311
parent 1f774404
No related branches found
No related tags found
No related merge requests found
Showing
with 22 additions and 14 deletions
...@@ -46,7 +46,7 @@ import org.fortiss.tooling.kernel.ui.dnd.ConnectionCompositionSource; ...@@ -46,7 +46,7 @@ import org.fortiss.tooling.kernel.ui.dnd.ConnectionCompositionSource;
* @author hoelzl * @author hoelzl
* @author $Author$ * @author $Author$
* @version $Rev$ * @version $Rev$
* @ConQAT.Rating YELLOW Hash: 354302A4CE71F645B69D34B798AD66F3 * @ConQAT.Rating GREEN Hash: B59CA1269FD90295352657E58548197A
*/ */
public class ConnectionCompositionDropTargetListener extends public class ConnectionCompositionDropTargetListener extends
AbstractTransferDropTargetListener { AbstractTransferDropTargetListener {
......
...@@ -39,7 +39,7 @@ import org.fortiss.tooling.kernel.extension.data.IConnectionCompositionContext; ...@@ -39,7 +39,7 @@ import org.fortiss.tooling.kernel.extension.data.IConnectionCompositionContext;
* @author hoelzl * @author hoelzl
* @author $Author$ * @author $Author$
* @version $Rev$ * @version $Rev$
* @ConQAT.Rating YELLOW Hash: FF0ECBEE0FEA5E701F5C9CB7AB0D3B06 * @ConQAT.Rating GREEN Hash: 1EAAF7FF6B88FDF5782B65149233492A
*/ */
public class ConnectionDragContext implements IConnectionCompositionContext { public class ConnectionDragContext implements IConnectionCompositionContext {
......
...@@ -47,7 +47,7 @@ import org.fortiss.tooling.kernel.extension.data.IConnectionCompositionContext; ...@@ -47,7 +47,7 @@ import org.fortiss.tooling.kernel.extension.data.IConnectionCompositionContext;
* @author hoelzl * @author hoelzl
* @author $Author$ * @author $Author$
* @version $Rev$ * @version $Rev$
* @ConQAT.Rating YELLOW Hash: ED316779B97B25D6691EB4EF09E9A5DA * @ConQAT.Rating GREEN Hash: 21F730770C8506BE3F3A014923B502AF
*/ */
public class ConnectionDropContext implements IConnectionCompositionContext { public class ConnectionDropContext implements IConnectionCompositionContext {
......
...@@ -46,7 +46,7 @@ import org.fortiss.tooling.kernel.ui.dnd.ElementCompositionSource; ...@@ -46,7 +46,7 @@ import org.fortiss.tooling.kernel.ui.dnd.ElementCompositionSource;
* @author hoelzl * @author hoelzl
* @author $Author$ * @author $Author$
* @version $Rev$ * @version $Rev$
* @ConQAT.Rating YELLOW Hash: 6C2E7A710D0DEC0A1524C999D70FAE86 * @ConQAT.Rating GREEN Hash: B1E79AD54A1B385D6BFD5058759AF9A9
*/ */
public class ElementCompositionDropTargetListener extends public class ElementCompositionDropTargetListener extends
AbstractTransferDropTargetListener { AbstractTransferDropTargetListener {
......
...@@ -43,7 +43,7 @@ import org.fortiss.tooling.kernel.extension.data.IElementCompositionContext; ...@@ -43,7 +43,7 @@ import org.fortiss.tooling.kernel.extension.data.IElementCompositionContext;
* @author hoelzl * @author hoelzl
* @author $Author$ * @author $Author$
* @version $Rev$ * @version $Rev$
* @ConQAT.Rating YELLOW Hash: 01605EE831D52FCF0C2849835AC66C26 * @ConQAT.Rating GREEN Hash: 9ED47424D63579597B8F2874EB085624
*/ */
public class ElementDropContext implements IElementCompositionContext { public class ElementDropContext implements IElementCompositionContext {
......
...@@ -18,6 +18,7 @@ $Id$ ...@@ -18,6 +18,7 @@ $Id$
package org.fortiss.tooling.base.ui.dnd.jface; package org.fortiss.tooling.base.ui.dnd.jface;
import static org.fortiss.tooling.kernel.ui.util.DragAndDropUtils.extractDroppedEObject; import static org.fortiss.tooling.kernel.ui.util.DragAndDropUtils.extractDroppedEObject;
import static org.fortiss.tooling.kernel.ui.util.DragAndDropUtils.getCompositionServiceTransfers;
import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EObject;
import org.eclipse.jface.viewers.TreeViewer; import org.eclipse.jface.viewers.TreeViewer;
...@@ -45,7 +46,7 @@ import org.fortiss.tooling.kernel.utils.ModelUtils; ...@@ -45,7 +46,7 @@ import org.fortiss.tooling.kernel.utils.ModelUtils;
* @author hoelzl * @author hoelzl
* @author $Author$ * @author $Author$
* @version $Rev$ * @version $Rev$
* @ConQAT.Rating YELLOW Hash: 30E98158032F24051E401A044E775F4D * @ConQAT.Rating GREEN Hash: C92271848C93CF412A754D2801FF3BC3
*/ */
public class ViewerElementCompositionDropAdapter extends ViewerDropAdapter { public class ViewerElementCompositionDropAdapter extends ViewerDropAdapter {
...@@ -113,6 +114,6 @@ public class ViewerElementCompositionDropAdapter extends ViewerDropAdapter { ...@@ -113,6 +114,6 @@ public class ViewerElementCompositionDropAdapter extends ViewerDropAdapter {
/** Returns the preferred transfer for the DND operation. */ /** Returns the preferred transfer for the DND operation. */
public Transfer[] getPreferredTransfers() { public Transfer[] getPreferredTransfers() {
return DragAndDropUtils.getCompositionServiceTransfers(); return getCompositionServiceTransfers();
} }
} }
...@@ -17,6 +17,10 @@ $Id$ ...@@ -17,6 +17,10 @@ $Id$
+--------------------------------------------------------------------------*/ +--------------------------------------------------------------------------*/
package org.fortiss.tooling.base.ui.editor; package org.fortiss.tooling.base.ui.editor;
import static org.conqat.ide.commons.gef.editpart.EditPartUtils.fullRefresh;
import static org.eclipse.gef.editparts.ZoomManager.FIT_ALL;
import static org.eclipse.gef.editparts.ZoomManager.FIT_HEIGHT;
import static org.eclipse.gef.editparts.ZoomManager.FIT_WIDTH;
import static org.fortiss.tooling.base.layout.DefaultLayoutConstants.DEFAULT_GRID_ORIGIN_X; import static org.fortiss.tooling.base.layout.DefaultLayoutConstants.DEFAULT_GRID_ORIGIN_X;
import static org.fortiss.tooling.base.layout.DefaultLayoutConstants.DEFAULT_GRID_ORIGIN_Y; import static org.fortiss.tooling.base.layout.DefaultLayoutConstants.DEFAULT_GRID_ORIGIN_Y;
import static org.fortiss.tooling.base.layout.DefaultLayoutConstants.DEFAULT_GRID_SIZE; import static org.fortiss.tooling.base.layout.DefaultLayoutConstants.DEFAULT_GRID_SIZE;
...@@ -28,7 +32,6 @@ import java.util.HashSet; ...@@ -28,7 +32,6 @@ import java.util.HashSet;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
import org.conqat.ide.commons.gef.editpart.EditPartUtils;
import org.eclipse.draw2d.ColorConstants; import org.eclipse.draw2d.ColorConstants;
import org.eclipse.draw2d.IFigure; import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.geometry.Dimension; import org.eclipse.draw2d.geometry.Dimension;
...@@ -99,7 +102,7 @@ import org.fortiss.tooling.kernel.ui.util.EObjectSelectionUtils; ...@@ -99,7 +102,7 @@ import org.fortiss.tooling.kernel.ui.util.EObjectSelectionUtils;
* @author hoelzl * @author hoelzl
* @author $Author$ * @author $Author$
* @version $Rev$ * @version $Rev$
* @ConQAT.Rating YELLOW Hash: 7B15AF8EF35DA949FB4FCC3345C5988B * @ConQAT.Rating RED Hash: 7787CCD0721B1100ED0F87095D599DD1
*/ */
public class DiagramEditorBase<T extends EObject> extends GEFEditorBase<T> public class DiagramEditorBase<T extends EObject> extends GEFEditorBase<T>
implements IPostSelectionProvider, ContextMenuContextProvider { implements IPostSelectionProvider, ContextMenuContextProvider {
...@@ -250,7 +253,7 @@ public class DiagramEditorBase<T extends EObject> extends GEFEditorBase<T> ...@@ -250,7 +253,7 @@ public class DiagramEditorBase<T extends EObject> extends GEFEditorBase<T>
@Override @Override
public void propertyChange(PropertyChangeEvent event) { public void propertyChange(PropertyChangeEvent event) {
if (event.getProperty().equals(EVisualStyle.ID)) { if (event.getProperty().equals(EVisualStyle.ID)) {
EditPartUtils.fullRefresh(viewer.getRootEditPart()); fullRefresh(viewer.getRootEditPart());
} }
} }
}; };
...@@ -328,8 +331,7 @@ public class DiagramEditorBase<T extends EObject> extends GEFEditorBase<T> ...@@ -328,8 +331,7 @@ public class DiagramEditorBase<T extends EObject> extends GEFEditorBase<T>
* Default zoom level contributions. * Default zoom level contributions.
*/ */
private static final List<String> defaultZoomLevelContribution = Arrays private static final List<String> defaultZoomLevelContribution = Arrays
.asList(new String[] { ZoomManager.FIT_ALL, ZoomManager.FIT_WIDTH, .asList(new String[] { FIT_ALL, FIT_WIDTH, FIT_HEIGHT });
ZoomManager.FIT_HEIGHT });
/** Registers global actions (including zoom action). */ /** Registers global actions (including zoom action). */
@Override @Override
...@@ -473,6 +475,11 @@ public class DiagramEditorBase<T extends EObject> extends GEFEditorBase<T> ...@@ -473,6 +475,11 @@ public class DiagramEditorBase<T extends EObject> extends GEFEditorBase<T>
* Highlights a figure by setting its color to be RED. This implementation * Highlights a figure by setting its color to be RED. This implementation
* can be changed by more specific editors. * can be changed by more specific editors.
*/ */
// TODO @review CD: unsafe code
// IMO double invocation of highlight(true) overwrites the normal color in
// the map and makes de-highlighting impossible
protected void setHighlight(IFigure fig, boolean highlighted) { protected void setHighlight(IFigure fig, boolean highlighted) {
if (highlighted) { if (highlighted) {
highlightedFigures2NormalColor.put(fig, fig.getForegroundColor()); highlightedFigures2NormalColor.put(fig, fig.getForegroundColor());
......
...@@ -40,7 +40,7 @@ import org.fortiss.tooling.kernel.ui.extension.base.EditorBase; ...@@ -40,7 +40,7 @@ import org.fortiss.tooling.kernel.ui.extension.base.EditorBase;
* @author ratiu * @author ratiu
* @author $Author: hoelzl $ * @author $Author: hoelzl $
* @version $Rev: 18709 $ * @version $Rev: 18709 $
* @ConQAT.Rating YELLOW Hash: 77237937DC7CBA4AA9BD8B671E8A9926 * @ConQAT.Rating GREEN Hash: BD71C31A22A4525094D90909D612FEB1
*/ */
public abstract class FormsEditorBase<T extends EObject> extends EditorBase<T> { public abstract class FormsEditorBase<T extends EObject> extends EditorBase<T> {
......
...@@ -39,7 +39,7 @@ import org.fortiss.tooling.kernel.service.IPersistencyService; ...@@ -39,7 +39,7 @@ import org.fortiss.tooling.kernel.service.IPersistencyService;
* @author hoelzl * @author hoelzl
* @author $Author$ * @author $Author$
* @version $Rev$ * @version $Rev$
* @ConQAT.Rating YELLOW Hash: 394C38363F275D47D9B146E156A62135 * @ConQAT.Rating GREEN Hash: DC9C2F53C31BA1266F540BA4615E67F1
*/ */
public abstract class GEFEditorBase<T extends EObject> extends public abstract class GEFEditorBase<T extends EObject> extends
org.fortiss.tooling.kernel.ui.extension.base.EditorBase<T> { org.fortiss.tooling.kernel.ui.extension.base.EditorBase<T> {
......
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