diff options
author | Michael Jastram | 2013-03-19 09:41:22 +0000 |
---|---|---|
committer | Michael Jastram | 2013-03-19 09:41:22 +0000 |
commit | 3259ce610877bdcfb6e3395b0e9a5650607b509c (patch) | |
tree | e2a6054d08df90f2af53f3ab7ad009bc646c4dfe | |
parent | c557da3490006f1e7b6999c4f921f29f6f212945 (diff) | |
download | org.eclipse.rmf-3259ce610877bdcfb6e3395b0e9a5650607b509c.tar.gz org.eclipse.rmf-3259ce610877bdcfb6e3395b0e9a5650607b509c.tar.xz org.eclipse.rmf-3259ce610877bdcfb6e3395b0e9a5650607b509c.zip |
RESOLVED - bug 403731: Id Presentation vertical alignment does not work
any more.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=403731
2 files changed, 35 insertions, 7 deletions
diff --git a/org.eclipse.rmf.reqif10.pror.presentation.id/src/org/eclipse/rmf/reqif10/pror/presentation/id/provider/IdConfigurationItemProvider.java b/org.eclipse.rmf.reqif10.pror.presentation.id/src/org/eclipse/rmf/reqif10/pror/presentation/id/provider/IdConfigurationItemProvider.java index a1ccc7b8..0614bc21 100644 --- a/org.eclipse.rmf.reqif10.pror.presentation.id/src/org/eclipse/rmf/reqif10/pror/presentation/id/provider/IdConfigurationItemProvider.java +++ b/org.eclipse.rmf.reqif10.pror.presentation.id/src/org/eclipse/rmf/reqif10/pror/presentation/id/provider/IdConfigurationItemProvider.java @@ -16,6 +16,8 @@ package org.eclipse.rmf.reqif10.pror.presentation.id.provider; import java.util.Collection;
import java.util.List;
+import org.agilemore.agilegrid.AgileGrid;
+import org.agilemore.agilegrid.CellEditor;
import org.eclipse.emf.common.command.Command;
import org.eclipse.emf.common.command.CompoundCommand;
import org.eclipse.emf.common.notify.AdapterFactory;
@@ -48,8 +50,11 @@ import org.eclipse.rmf.reqif10.common.util.ReqIF10Util; import org.eclipse.rmf.reqif10.pror.configuration.ConfigurationPackage;
import org.eclipse.rmf.reqif10.pror.configuration.ProrPresentationConfiguration;
import org.eclipse.rmf.reqif10.pror.configuration.provider.ProrPresentationConfigurationItemProvider;
+import org.eclipse.rmf.reqif10.pror.editor.presentation.service.IProrCellRenderer;
+import org.eclipse.rmf.reqif10.pror.editor.presentation.service.PresentationEditorInterface;
import org.eclipse.rmf.reqif10.pror.presentation.id.IdConfiguration;
import org.eclipse.rmf.reqif10.pror.presentation.id.IdPackage;
+import org.eclipse.rmf.reqif10.pror.presentation.ui.IdLabelCellRenderer;
/**
* This is the item provider adapter for a {@link org.eclipse.rmf.reqif10.pror.presentation.id.IdConfiguration} object.
@@ -64,7 +69,8 @@ public class IdConfigurationItemProvider IStructuredItemContentProvider,
ITreeItemContentProvider,
IItemLabelProvider,
- IItemPropertySource {
+ IItemPropertySource,
+ PresentationEditorInterface {
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
@@ -364,5 +370,33 @@ public class IdConfigurationItemProvider public boolean canEdit() {
return false;
}
+
+ IProrCellRenderer renderer = null;
+
+ /**
+ * Use special renderer.
+ */
+ public IProrCellRenderer getCellRenderer(AttributeValue av) {
+ if (renderer == null) {
+ renderer = new IdLabelCellRenderer();
+ }
+ return renderer;
+ }
+
+ /**
+ * No special {@link CellEditor}.
+ */
+ public CellEditor getCellEditor(AgileGrid agileGrid,
+ EditingDomain editingDomain, AttributeValue av,
+ SpecElementWithAttributes parent, Object affectedObject) {
+ return null;
+ }
+
+ /**
+ * Not suggested as default.
+ */
+ public Class<? extends DatatypeDefinition> suggestAsDefault() {
+ return null;
+ }
}
diff --git a/org.eclipse.rmf.reqif10.pror.presentation.id/src/org/eclipse/rmf/reqif10/pror/presentation/ui/IdLabelCellRenderer.java b/org.eclipse.rmf.reqif10.pror.presentation.id/src/org/eclipse/rmf/reqif10/pror/presentation/ui/IdLabelCellRenderer.java index 09ea1d20..c34517a1 100644 --- a/org.eclipse.rmf.reqif10.pror.presentation.id/src/org/eclipse/rmf/reqif10/pror/presentation/ui/IdLabelCellRenderer.java +++ b/org.eclipse.rmf.reqif10.pror.presentation.id/src/org/eclipse/rmf/reqif10/pror/presentation/ui/IdLabelCellRenderer.java @@ -27,16 +27,10 @@ import org.eclipse.swt.graphics.Rectangle; public class IdLabelCellRenderer implements IProrCellRenderer {
- IdConfiguration config;
-
public IdLabelCellRenderer() {
}
- public IdLabelCellRenderer(IdConfiguration config) {
- this.config = config;
- }
-
public int doDrawCellContent(GC gc, Rectangle rect, Object value) {
if (value instanceof AttributeValueString) {
Object text = ReqIF10Util.getTheValue((AttributeValue) value);
|