summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJayant Gupta2012-12-12 23:22:21 (EST)
committer Jayant Gupta2012-12-12 23:22:21 (EST)
commitc10418124bed15104b0e3821324c0c92056fe257 (patch)
treeef7616d2c7ce51742167894988c0f1e94fc08e6a
parent7edac7ca09158fcc241c6906fbad3d09a6cfd3dd (diff)
downloadorg.eclipse.etrice-c10418124bed15104b0e3821324c0c92056fe257.zip
org.eclipse.etrice-c10418124bed15104b0e3821324c0c92056fe257.tar.gz
org.eclipse.etrice-c10418124bed15104b0e3821324c0c92056fe257.tar.bz2
Does corrections proposed in earlier reviewsrefs/changes/12/9212/1
1. Omits unnecessary dependencies 2. Removes unused Preference Initializer 3. Removes unnecessary refreshing of layout view 4. Corrects variable names Change-Id: I23e0e0e797696b6e1614b8dd36301839380ab744
-rw-r--r--plugins/org.eclipse.etrice.ui.layout/META-INF/MANIFEST.MF1
-rw-r--r--plugins/org.eclipse.etrice.ui.layout/plugin.xml3
-rw-r--r--plugins/org.eclipse.etrice.ui.layout/src/org/eclipse/etrice/ui/layout/ETriceDiagramLayoutManager.java22
-rw-r--r--plugins/org.eclipse.etrice.ui.layout/src/org/eclipse/etrice/ui/layout/ETriceLayoutConfig.java2
-rw-r--r--plugins/org.eclipse.etrice.ui.layout/src/org/eclipse/etrice/ui/layout/preferences/ETriceLayoutPreferencePage.java5
-rw-r--r--plugins/org.eclipse.etrice.ui.layout/src/org/eclipse/etrice/ui/layout/preferences/PreferenceInitializer.java34
6 files changed, 12 insertions, 55 deletions
diff --git a/plugins/org.eclipse.etrice.ui.layout/META-INF/MANIFEST.MF b/plugins/org.eclipse.etrice.ui.layout/META-INF/MANIFEST.MF
index b94c4f6..a9921f0 100644
--- a/plugins/org.eclipse.etrice.ui.layout/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.etrice.ui.layout/META-INF/MANIFEST.MF
@@ -13,7 +13,6 @@ Require-Bundle: org.eclipse.graphiti;bundle-version="0.8.1",
org.eclipse.ui.views.properties.tabbed;bundle-version="3.5.0",
com.google.guava;bundle-version="8.0.0",
de.cau.cs.kieler.core,
- de.cau.cs.kieler.core.ui,
de.cau.cs.kieler.core.kgraph,
de.cau.cs.kieler.kiml.ui,
de.cau.cs.kieler.kiml.graphiti;bundle-version="0.2.0",
diff --git a/plugins/org.eclipse.etrice.ui.layout/plugin.xml b/plugins/org.eclipse.etrice.ui.layout/plugin.xml
index c76fbd0..1def84f 100644
--- a/plugins/org.eclipse.etrice.ui.layout/plugin.xml
+++ b/plugins/org.eclipse.etrice.ui.layout/plugin.xml
@@ -58,9 +58,6 @@
</extension>
<extension
point="org.eclipse.core.runtime.preferences">
- <initializer
- class="org.eclipse.etrice.ui.layout.preferences.PreferenceInitializer">
- </initializer>
</extension>
<extension
point="org.eclipse.ui.preferencePages">
diff --git a/plugins/org.eclipse.etrice.ui.layout/src/org/eclipse/etrice/ui/layout/ETriceDiagramLayoutManager.java b/plugins/org.eclipse.etrice.ui.layout/src/org/eclipse/etrice/ui/layout/ETriceDiagramLayoutManager.java
index f9c5821..cc9d6b4 100644
--- a/plugins/org.eclipse.etrice.ui.layout/src/org/eclipse/etrice/ui/layout/ETriceDiagramLayoutManager.java
+++ b/plugins/org.eclipse.etrice.ui.layout/src/org/eclipse/etrice/ui/layout/ETriceDiagramLayoutManager.java
@@ -250,7 +250,7 @@ public abstract class ETriceDiagramLayoutManager extends
(Shape) element, null));
} else {
- KGraphElement internalKGraphElement = createKGaphElementFromShape(
+ KGraphElement internalKGraphElement = createKGraphElementFromShape(
mapping, null, (Shape) element);
if (internalKGraphElement instanceof KNode
@@ -259,7 +259,7 @@ public abstract class ETriceDiagramLayoutManager extends
for (Shape childShape : ((ContainerShape) element)
.getChildren()) {
- createKGaphElementFromShape(mapping,
+ createKGraphElementFromShape(mapping,
internalKGraphElement, childShape);
}
@@ -337,24 +337,24 @@ public abstract class ETriceDiagramLayoutManager extends
KNode topLevelBoundingBoxNode = createNode(mapping, diagramNode,
topLevelBoundingBox);
- for (Shape secondtLevelShape : ((ContainerShape) topLevelBoundingBox)
+ for (Shape secondLevelShape : ((ContainerShape) topLevelBoundingBox)
.getChildren()) {
// Second Level
- KGraphElement secondLevelKGraphElement = createKGaphElementFromShape(
- mapping, topLevelBoundingBoxNode, secondtLevelShape);
+ KGraphElement secondLevelKGraphElement = createKGraphElementFromShape(
+ mapping, topLevelBoundingBoxNode, secondLevelShape);
if (secondLevelKGraphElement instanceof KNode) {
- for (Shape thirdLevelShape : ((ContainerShape) secondtLevelShape)
+ for (Shape thirdLevelShape : ((ContainerShape) secondLevelShape)
.getChildren()) {
// Third Level
- createKGaphElementFromShape(mapping,
+ createKGraphElementFromShape(mapping,
secondLevelKGraphElement, thirdLevelShape);
}
- if (!isInternalPort(secondtLevelShape)) {
+ if (!isInternalPort(secondLevelShape)) {
// For KNodes which are not internal ports.
setNodeLayoutOptions(mapping,
- (KNode) secondLevelKGraphElement, secondtLevelShape);
+ (KNode) secondLevelKGraphElement, secondLevelShape);
}
}
@@ -382,7 +382,7 @@ public abstract class ETriceDiagramLayoutManager extends
* @author jayant
*/
/* This is fairly general for both the eTrice editors */
- private KGraphElement createKGaphElementFromShape(
+ private KGraphElement createKGraphElementFromShape(
LayoutMapping<PictogramElement> mapping, KGraphElement parent,
Shape shape) {
@@ -455,7 +455,7 @@ public abstract class ETriceDiagramLayoutManager extends
// Set Port label
Shape portLabelShape = ((ContainerShape) shape).getChildren().get(0);
- createKGaphElementFromShape(mapping, port, portLabelShape);
+ createKGraphElementFromShape(mapping, port, portLabelShape);
// gather all connections connected to the parentNode via this port
for (Anchor anchor : shape.getAnchors()) {
diff --git a/plugins/org.eclipse.etrice.ui.layout/src/org/eclipse/etrice/ui/layout/ETriceLayoutConfig.java b/plugins/org.eclipse.etrice.ui.layout/src/org/eclipse/etrice/ui/layout/ETriceLayoutConfig.java
index 6905256..280239a 100644
--- a/plugins/org.eclipse.etrice.ui.layout/src/org/eclipse/etrice/ui/layout/ETriceLayoutConfig.java
+++ b/plugins/org.eclipse.etrice.ui.layout/src/org/eclipse/etrice/ui/layout/ETriceLayoutConfig.java
@@ -87,7 +87,7 @@ public class ETriceLayoutConfig implements ILayoutConfig {
*/
@Override
public Object getValue(LayoutOptionData<?> optionData, LayoutContext context) {
- if (optionData.getId().equals(LayoutOptions.DIAGRAM_TYPE.getId())) {
+ if (optionData.equals(LayoutOptions.DIAGRAM_TYPE)) {
EObject element = context.getProperty(LayoutContext.DOMAIN_MODEL);
if (element instanceof ActorContainerClass
diff --git a/plugins/org.eclipse.etrice.ui.layout/src/org/eclipse/etrice/ui/layout/preferences/ETriceLayoutPreferencePage.java b/plugins/org.eclipse.etrice.ui.layout/src/org/eclipse/etrice/ui/layout/preferences/ETriceLayoutPreferencePage.java
index 45df03b..cf9ca59 100644
--- a/plugins/org.eclipse.etrice.ui.layout/src/org/eclipse/etrice/ui/layout/preferences/ETriceLayoutPreferencePage.java
+++ b/plugins/org.eclipse.etrice.ui.layout/src/org/eclipse/etrice/ui/layout/preferences/ETriceLayoutPreferencePage.java
@@ -31,7 +31,6 @@ import org.eclipse.ui.IWorkbenchPreferencePage;
import de.cau.cs.kieler.kiml.ui.Messages;
import de.cau.cs.kieler.kiml.ui.diagram.LayoutHandler;
import de.cau.cs.kieler.kiml.ui.service.EclipseLayoutInfoService;
-import de.cau.cs.kieler.kiml.ui.views.LayoutViewPart;
/**
* Preference page for common KIML preferences.
@@ -176,10 +175,6 @@ public class ETriceLayoutPreferencePage extends PreferencePage implements
preferenceStore.setValue(EclipseLayoutInfoService.PREF_OBLIQUE_ROUTE,
obliqueCheckBox.getSelection());
- LayoutViewPart layoutView = LayoutViewPart.findView();
- if (layoutView != null) {
- layoutView.refresh();
- }
return true;
}
diff --git a/plugins/org.eclipse.etrice.ui.layout/src/org/eclipse/etrice/ui/layout/preferences/PreferenceInitializer.java b/plugins/org.eclipse.etrice.ui.layout/src/org/eclipse/etrice/ui/layout/preferences/PreferenceInitializer.java
deleted file mode 100644
index 534c144..0000000
--- a/plugins/org.eclipse.etrice.ui.layout/src/org/eclipse/etrice/ui/layout/preferences/PreferenceInitializer.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012 Jayant Gupta
- * 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:
- * Jayant Gupta (initial contribution)
- *
- *
- *******************************************************************************/
-
-package org.eclipse.etrice.ui.layout.preferences;
-
-import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
-
-/**
- * Class used to initialize default preference values.
- *
- */
-public class PreferenceInitializer extends AbstractPreferenceInitializer {
-
- /**
- * {@inheritDoc}
- *
- * @author jayant
- */
- public void initializeDefaultPreferences() {
- // No Default initializations need to be made in the shared Preference
- // Store (already made by kiml.ui.preferences.PreferenceInitializer)
- }
-
-}