summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkwilk2010-12-20 13:30:27 (EST)
committerRyan D. Brooks2010-12-20 13:30:27 (EST)
commitf4ca4acfd6007e3009b929ffd3f1ca89dcda291d (patch)
tree96b0ba60048fc2f225de54b46b6093d4dab7538a
parent73faa3088981f055882f98a47a9894bec614451c (diff)
downloadorg.eclipse.osee-f4ca4acfd6007e3009b929ffd3f1ca89dcda291d.zip
org.eclipse.osee-f4ca4acfd6007e3009b929ffd3f1ca89dcda291d.tar.gz
org.eclipse.osee-f4ca4acfd6007e3009b929ffd3f1ca89dcda291d.tar.bz2
bug[bgz_332967]: Fix refresh of Artifact Editor dirty indication on edit of relation rationale
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/RelationCellModifier.java8
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/RelationsComposite.java14
2 files changed, 12 insertions, 10 deletions
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/RelationCellModifier.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/RelationCellModifier.java
index 2e5687c..0f7c400 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/RelationCellModifier.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/RelationCellModifier.java
@@ -18,6 +18,7 @@ import org.eclipse.osee.framework.jdk.core.util.Strings;
import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.skynet.core.relation.RelationLink;
import org.eclipse.osee.framework.skynet.core.relation.RelationManager;
+import org.eclipse.osee.framework.ui.swt.IDirtiableEditor;
import org.eclipse.swt.widgets.Item;
/**
@@ -25,11 +26,11 @@ import org.eclipse.swt.widgets.Item;
*/
public class RelationCellModifier implements ICellModifier {
private final TreeViewer treeViewer;
+ private final IDirtiableEditor editor;
- public RelationCellModifier(TreeViewer treeViewer) {
- super();
+ public RelationCellModifier(TreeViewer treeViewer, IDirtiableEditor editor) {
this.treeViewer = treeViewer;
- // pList.addPermission(Permission.PermPermissionEnum.EDITREQUIREMENT);
+ this.editor = editor;
}
@Override
@@ -60,6 +61,7 @@ public class RelationCellModifier implements ICellModifier {
link.setRationale(value.toString());
}
treeViewer.update(element, null);
+ editor.onDirtied();
}
private RelationLink getRelationLink(WrapperForRelationLink relLink) {
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/RelationsComposite.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/RelationsComposite.java
index c232db2..9151b06 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/RelationsComposite.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/RelationsComposite.java
@@ -121,8 +121,8 @@ public class RelationsComposite extends Composite implements ISelectedArtifact {
}
public void createPartControl() {
- this.setLayout(new GridLayout());
- this.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+ setLayout(new GridLayout());
+ setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
createTreeArea(this);
createColumns();
@@ -142,7 +142,7 @@ public class RelationsComposite extends Composite implements ISelectedArtifact {
CellEditor[] editors = new CellEditor[columnNames.length];
editors[1] = new TextCellEditor(tree);
treeViewer.setCellEditors(editors);
- treeViewer.setCellModifier(new RelationCellModifier(treeViewer));
+ treeViewer.setCellModifier(new RelationCellModifier(treeViewer, editor));
treeViewer.setColumnProperties(columnNames);
treeViewer.setContentProvider(new RelationContentProvider());
treeViewer.setLabelProvider(relationLabelProvider);
@@ -150,7 +150,7 @@ public class RelationsComposite extends Composite implements ISelectedArtifact {
treeViewer.setInput(artifact);
treeViewer.addDoubleClickListener(new DoubleClickListener());
- treeViewer.getTree().addMouseListener(new MouseListener() {
+ tree.addMouseListener(new MouseListener() {
@Override
public void mouseUp(MouseEvent e) {
@@ -514,8 +514,8 @@ public class RelationsComposite extends Composite implements ISelectedArtifact {
Collection<MenuItem> artEnabledOnlyitems;
public NeedSelectedArtifactListener() {
- this.accessControlitems = new LinkedList<MenuItem>();
- this.artEnabledOnlyitems = new LinkedList<MenuItem>();
+ accessControlitems = new LinkedList<MenuItem>();
+ artEnabledOnlyitems = new LinkedList<MenuItem>();
}
public void addArtifactEnabled(MenuItem item) {
@@ -568,7 +568,7 @@ public class RelationsComposite extends Composite implements ISelectedArtifact {
while (iter.hasNext()) {
treeViewer.expandToLevel(iter.next(), AbstractTreeViewer.ALL_LEVELS);
}
- this.packColumnData();
+ packColumnData();
}
/**