<graph />\r
<this />\r
</type>\r
- </target>\r \r <target\r interface="org.simantics.sysdyn.ui.browser.nodes.AbstractNode">\r <type\r uri="http://www.simantics.org/Sysdyn-1.0/SysdynModel"\r class="org.simantics.sysdyn.ui.browser.nodes.ModelNode">\r <this />\r </type>\r \r <type\r uri="http://www.simantics.org/Sysdyn-1.0/IndependentVariable"\r class="org.simantics.sysdyn.ui.browser.nodes.VariableNode">\r <this />\r </type>\r \r <type\r uri="http://www.simantics.org/Sysdyn-1.0/Input"\r class="org.simantics.sysdyn.ui.browser.nodes.InputNode">\r <this />\r </type>\r \r <type\r uri="http://www.simantics.org/Sysdyn-1.0/Module"\r class="org.simantics.sysdyn.ui.browser.nodes.ModuleNode">\r <this />\r </type>\r \r <resource\r uri="http://www.simantics.org/Sysdyn-1.0/Module"\r class="org.simantics.sysdyn.ui.browser.nodes.ModuleTypeNode">\r <this />\r </resource>\r\r <resource\r uri="http://www.simantics.org/Sysdyn-1.0/ModuleSymbol"\r class="org.simantics.sysdyn.ui.browser.nodes.SymbolNode">\r <this />\r </resource>\r\r <type\r uri="http://www.simantics.org/Simulation-1.0/Types/Experiment"\r class="org.simantics.sysdyn.ui.browser.nodes.ExperimentNode">\r <this />\r </type>\r \r <type\r uri="http://www.simantics.org/Sysdyn-1.0/Result"\r class="org.simantics.sysdyn.ui.browser.nodes.SimulationResultNode">\r <this />\r </type>\r \r </target>\r\r <!-- Inject default connection routing algorithm for sysdyn diagrams -->\r <target interface="org.simantics.g2d.diagram.DiagramClass">\r <adapter uri="http://www.simantics.org/Sysdyn-1.0/ConfigurationDiagram"\r adapterClass="org.simantics.sysdyn.ui.elements2.ConfigurationDiagramClassAdapter" />\r </target>\r\r <!-- Sysdyn symbols -->\r <target interface="org.simantics.diagram.adapter.ElementFactory">\r <resource uri="http://www.simantics.org/Sysdyn-1.0/StockSymbol"\r class="org.simantics.sysdyn.ui.elements2.StockFactory" />\r <resource uri="http://www.simantics.org/Sysdyn-1.0/ModuleSymbol"\r class="org.simantics.sysdyn.ui.elements2.ModuleFactory" />\r <resource uri="http://www.simantics.org/Sysdyn-1.0/ValveSymbol"\r class="org.simantics.sysdyn.ui.elements2.ValveFactory" />\r <resource uri="http://www.simantics.org/Sysdyn-1.0/AuxiliarySymbol"\r class="org.simantics.sysdyn.ui.elements2.AuxiliaryFactory" />\r <resource uri="http://www.simantics.org/Sysdyn-1.0/CloudSymbol"\r class="org.simantics.sysdyn.ui.elements2.CloudFactory" />\r <resource uri="http://www.simantics.org/Sysdyn-1.0/InputSymbol"\r class="org.simantics.sysdyn.ui.elements2.InputFactory" />\r\r <type uri="http://www.simantics.org/Sysdyn-1.0/StockSymbol"\r class="org.simantics.sysdyn.ui.elements2.StockFactory" />\r <type uri="http://www.simantics.org/Sysdyn-1.0/ModuleSymbol"\r class="org.simantics.sysdyn.ui.elements2.ModuleFactory" />\r <type uri="http://www.simantics.org/Sysdyn-1.0/ValveSymbol"\r class="org.simantics.sysdyn.ui.elements2.ValveFactory" />\r <type uri="http://www.simantics.org/Sysdyn-1.0/AuxiliarySymbol"\r class="org.simantics.sysdyn.ui.elements2.AuxiliaryFactory" />\r <type uri="http://www.simantics.org/Sysdyn-1.0/CloudSymbol"\r class="org.simantics.sysdyn.ui.elements2.CloudFactory" />\r <type uri="http://www.simantics.org/Sysdyn-1.0/InputSymbol"\r class="org.simantics.sysdyn.ui.elements2.InputFactory" /> \r </target>\r \r <!-- Sysdyn connections -->\r <target interface="org.simantics.diagram.adapter.ElementFactory">\r <!-- Edges -->\r <resource uri="http://www.simantics.org/Sysdyn-1.0/FlowConnection"\r class="org.simantics.sysdyn.ui.elements2.FlowEdgeFactory" />\r <resource uri="http://www.simantics.org/Sysdyn-1.0/DependencyConnection"\r class="org.simantics.sysdyn.ui.elements2.DependencyEdgeFactory" />\r <type uri="http://www.simantics.org/Sysdyn-1.0/FlowConnection"\r class="org.simantics.sysdyn.ui.elements2.FlowEdgeFactory" />\r <type uri="http://www.simantics.org/Sysdyn-1.0/DependencyConnection"\r class="org.simantics.sysdyn.ui.elements2.DependencyEdgeFactory" />\r <!-- : SYSDYN.Connection-->\r <type uri="http://www.simantics.org/Sysdyn-1.0/FlowConnection"\r class="org.simantics.sysdyn.ui.elements2.FlowConnectionFactory" />\r <type uri="http://www.simantics.org/Sysdyn-1.0/DependencyConnection"\r class="org.simantics.sysdyn.ui.elements2.DependencyConnectionFactory" />\r </target>\r \r <target interface="org.simantics.g2d.connection.EdgeVisualsConfigurer">\r <baseType uri="http://www.simantics.org/Diagram-2.0/HasConnector" />\r <resource uri="http://www.simantics.org/Diagram-2.0/HasPlainConnector"\r class="org.simantics.diagram.content.ArrowConfigurer">\r <string>none 0</string>\r </resource>\r <resource uri="http://www.simantics.org/Diagram-2.0/HasArrowConnector"\r class="org.simantics.diagram.content.ArrowConfigurer">\r <string>fill 1</string>\r </resource>\r </target>\r \r
+ </target>\r \r <target\r interface="org.simantics.sysdyn.ui.browser.nodes.AbstractNode">\r <type\r uri="http://www.simantics.org/Sysdyn-1.0/SysdynModel"\r class="org.simantics.sysdyn.ui.browser.nodes.ModelNode">\r <this />\r </type>\r \r <type\r uri="http://www.simantics.org/Sysdyn-1.0/IndependentVariable"\r class="org.simantics.sysdyn.ui.browser.nodes.VariableNode">\r <this />\r </type>\r \r <type\r uri="http://www.simantics.org/Sysdyn-1.0/Input"\r class="org.simantics.sysdyn.ui.browser.nodes.InputNode">\r <this />\r </type>\r \r <type\r uri="http://www.simantics.org/Sysdyn-1.0/Module"\r class="org.simantics.sysdyn.ui.browser.nodes.ModuleNode">\r <this />\r </type>\r \r <resource\r uri="http://www.simantics.org/Sysdyn-1.0/Module"\r class="org.simantics.sysdyn.ui.browser.nodes.ModuleTypeNode">\r <this />\r </resource>\r\r <resource\r uri="http://www.simantics.org/Sysdyn-1.0/ModuleSymbol"\r class="org.simantics.sysdyn.ui.browser.nodes.SymbolNode">\r <this />\r </resource>\r\r <type\r uri="http://www.simantics.org/Simulation-1.0/Types/Experiment"\r class="org.simantics.sysdyn.ui.browser.nodes.ExperimentNode">\r <this />\r </type>\r \r <type\r uri="http://www.simantics.org/Sysdyn-1.0/Result"\r class="org.simantics.sysdyn.ui.browser.nodes.SimulationResultNode">\r <this />\r </type>\r \r </target>\r\r <!-- Inject default connection routing algorithm for sysdyn diagrams -->\r <target interface="org.simantics.g2d.diagram.DiagramClass">\r <adapter uri="http://www.simantics.org/Sysdyn-1.0/ConfigurationDiagram"\r adapterClass="org.simantics.sysdyn.ui.elements2.ConfigurationDiagramClassAdapter" />\r </target>\r\r <!-- Sysdyn symbols -->\r <target interface="org.simantics.diagram.adapter.ElementFactory">\r <resource uri="http://www.simantics.org/Sysdyn-1.0/StockSymbol"\r class="org.simantics.sysdyn.ui.elements2.StockFactory" />\r <resource uri="http://www.simantics.org/Sysdyn-1.0/ModuleSymbol"\r class="org.simantics.sysdyn.ui.elements2.ModuleFactory" />\r <resource uri="http://www.simantics.org/Sysdyn-1.0/ValveSymbol"\r class="org.simantics.sysdyn.ui.elements2.ValveFactory" />\r <resource uri="http://www.simantics.org/Sysdyn-1.0/AuxiliarySymbol"\r class="org.simantics.sysdyn.ui.elements2.AuxiliaryFactory" />\r <resource uri="http://www.simantics.org/Sysdyn-1.0/CloudSymbol"\r class="org.simantics.sysdyn.ui.elements2.CloudFactory" />\r <resource uri="http://www.simantics.org/Sysdyn-1.0/InputSymbol"\r class="org.simantics.sysdyn.ui.elements2.InputFactory" />\r\r <type uri="http://www.simantics.org/Sysdyn-1.0/StockSymbol"\r class="org.simantics.sysdyn.ui.elements2.StockFactory" />\r <type uri="http://www.simantics.org/Sysdyn-1.0/ModuleSymbol"\r class="org.simantics.sysdyn.ui.elements2.ModuleFactory" />\r <type uri="http://www.simantics.org/Sysdyn-1.0/ValveSymbol"\r class="org.simantics.sysdyn.ui.elements2.ValveFactory" />\r <type uri="http://www.simantics.org/Sysdyn-1.0/AuxiliarySymbol"\r class="org.simantics.sysdyn.ui.elements2.AuxiliaryFactory" />\r <type uri="http://www.simantics.org/Sysdyn-1.0/CloudSymbol"\r class="org.simantics.sysdyn.ui.elements2.CloudFactory" />\r <type uri="http://www.simantics.org/Sysdyn-1.0/InputSymbol"\r class="org.simantics.sysdyn.ui.elements2.InputFactory" /> \r </target>\r \r <!-- Sysdyn connections -->\r <target interface="org.simantics.diagram.adapter.ElementFactory">\r <!-- Edges -->\r <resource uri="http://www.simantics.org/Sysdyn-1.0/FlowConnection"\r class="org.simantics.sysdyn.ui.elements2.connections.FlowEdgeFactory" />\r <resource uri="http://www.simantics.org/Sysdyn-1.0/DependencyConnection"\r class="org.simantics.sysdyn.ui.elements2.connections.DependencyEdgeFactory" />\r <type uri="http://www.simantics.org/Sysdyn-1.0/FlowConnection"\r class="org.simantics.sysdyn.ui.elements2.connections.FlowEdgeFactory" />\r <type uri="http://www.simantics.org/Sysdyn-1.0/DependencyConnection"\r class="org.simantics.sysdyn.ui.elements2.connections.DependencyEdgeFactory" />\r <!-- : SYSDYN.Connection-->\r <type uri="http://www.simantics.org/Sysdyn-1.0/FlowConnection"\r class="org.simantics.sysdyn.ui.elements2.connections.FlowConnectionFactory" />\r <type uri="http://www.simantics.org/Sysdyn-1.0/DependencyConnection"\r class="org.simantics.sysdyn.ui.elements2.connections.DependencyConnectionFactory" />\r </target>\r \r <target interface="org.simantics.g2d.connection.EdgeVisualsConfigurer">\r <baseType uri="http://www.simantics.org/Diagram-2.0/HasConnector" />\r <resource uri="http://www.simantics.org/Diagram-2.0/HasPlainConnector"\r class="org.simantics.diagram.content.ArrowConfigurer">\r <string>none 0</string>\r </resource>\r <resource uri="http://www.simantics.org/Diagram-2.0/HasArrowConnector"\r class="org.simantics.diagram.content.ArrowConfigurer">\r <string>fill 1</string>\r </resource>\r </target>\r \r
</adapters>
\ No newline at end of file
import org.simantics.browsing.ui.swt.IPropertyPage;\r
import org.simantics.db.ReadGraph;\r
import org.simantics.db.Session;\r
-import org.simantics.db.common.ResourceArray;\r
import org.simantics.diagram.adapter.FlagClassFactory;\r
import org.simantics.diagram.handler.CopyPasteHandler;\r
import org.simantics.diagram.stubs.DiagramResource;\r
import org.simantics.diagram.synchronization.IModifiableSynchronizationContext;\r
-import org.simantics.g2d.canvas.ICanvasContext;\r
import org.simantics.g2d.canvas.impl.CanvasContext;\r
import org.simantics.g2d.connection.IConnectionAdvisor;\r
import org.simantics.g2d.diagram.DiagramHints;\r
import org.simantics.g2d.element.ElementClasses;\r
import org.simantics.g2d.element.IElementClassProvider;\r
import org.simantics.g2d.element.handler.impl.StaticObjectAdapter;\r
-import org.simantics.modeling.ui.diagramEditor.handlers.WorkbenchStructuralSelectionProvider2;\r
import org.simantics.structural2.modelingRules.IModelingRules;\r
import org.simantics.sysdyn.SysdynResource;\r
-import org.simantics.sysdyn.ui.elements2.ConnectionClasses;\r
-import org.simantics.sysdyn.ui.elements2.SysdynConnectionClass;\r
+import org.simantics.sysdyn.ui.elements2.connections.ConnectionClasses;\r
+import org.simantics.sysdyn.ui.elements2.connections.SysdynConnectionClass;\r
import org.simantics.sysdyn.ui.properties.SysdynPropertyPage;\r
\r
/**\r
import org.simantics.g2d.participant.MouseUtil;\r
import org.simantics.g2d.participant.TransformUtil;\r
import org.simantics.g2d.routing.RouterFactory;\r
-import org.simantics.g2d.snap.ISnapAdvisor;\r
import org.simantics.g2d.utils.GeometryUtils;\r
import org.simantics.sysdyn.ui.elements2.AuxiliaryFactory;\r
import org.simantics.sysdyn.ui.elements2.CloudFactory;\r
-import org.simantics.sysdyn.ui.elements2.ConnectionClasses;\r
+import org.simantics.sysdyn.ui.elements2.connections.ConnectionClasses;\r
\r
/**\r
* Pointer tool does the following operations with mouse:\r
if (advisor == null || (advisor != null && advisor.canBeginConnection(null, ti.e, ti.t))) {\r
bsi = new ConnectTool(diagram, connectionClass, ti.e, ti.t, me.mouseId, curCanvasPos);\r
}\r
- } else {\r
+ } \r
+ /* Cannot be null\r
+ else {\r
ISnapAdvisor snapAdvisor = getHint(DiagramHints.SNAP_ADVISOR);\r
if(snapAdvisor != null) \r
snapAdvisor.snap(curCanvasPos);\r
// Start connection out of thin air, without a terminal.\r
bsi = new ConnectTool(diagram, elementClassProvider.get(ConnectionClasses.DEPENDENCY), null, null, me.mouseId, curCanvasPos);\r
}\r
+ */\r
if (bsi != null) {\r
getContext().add(bsi);\r
return true;\r
\r
private PropertyChangeListener fieldListener = null;\r
\r
- GraphPropertyNode() {\r
+ protected GraphPropertyNode() {\r
for(Field f : getClass().getFields()) {\r
// System.out.println("register field '" + f.getName() + "'");\r
fields.put(f.getName(), f);\r
module = graph.getSingleObject(moduleRepresentation, b.Represents);\r
String parentURI = graph.getURI(parent);\r
String modelURI = diagram.getHint((DiagramModelHints.KEY_DIAGRAM_MODEL_URI));\r
- System.out.println(parentURI + " < -- > " + modelURI);\r
if(parentURI.equals(modelURI))\r
moduleName = "";\r
else {\r
}\r
\r
SysdynElementUtils.setInputReference(e, inputReference);\r
+ \r
+ Font font = ElementUtils.getTextFont(e);\r
+ font = font.deriveFont(font.getStyle() + Font.ITALIC);\r
+ ElementUtils.setTextFont(e, font);\r
}\r
\r
\r
@Override\r
public void init(final IElement e, G2DParentNode parent) {\r
super.init(e, parent);\r
- TextNode name = (TextNode) e.getHint(SG_NODE);\r
- Font font = name.getFont().deriveFont(Font.ITALIC);\r
- name.setFont(font);\r
TextNode node = ElementUtils.getOrCreateNode(e, parent, INPUT_SG_NODE, "input", TextNode.class);\r
- font = ElementUtils.getTextFont(e);\r
+ Font font = ElementUtils.getTextFont(e);\r
font = font.deriveFont((float) 10.0);\r
font = font.deriveFont(Font.ITALIC);\r
Color color = new Color(150, 150, 150);\r
*******************************************************************************/\r
package org.simantics.sysdyn.ui.elements2;\r
\r
+import java.awt.Font;\r
import java.awt.geom.AffineTransform;\r
import java.util.ArrayList;\r
import java.util.Collection;\r
import org.simantics.g2d.element.handler.impl.ObjectTerminal;\r
import org.simantics.modeling.ModelingResources;\r
import org.simantics.structural.stubs.StructuralResource2;\r
+import org.simantics.sysdyn.SysdynResource;\r
\r
/**\r
* An ElementFactory that gathers common functionality for system dynamics symbols.\r
ElementUtils.setTextColor(e, G2DUtils.getColor(graph, colorResource));\r
}\r
\r
+ if (graph.hasStatement(component, SysdynResource.getInstance(graph).IsOutput)) {\r
+ Font font = ElementUtils.getTextFont(e);\r
+ font = font.deriveFont(Font.BOLD);\r
+ ElementUtils.setTextFont(e, font);\r
+ }\r
+\r
AffineTransform at = DiagramGraphUtil.getAffineTransform(graph, element);\r
ElementUtils.setTransform(e, at);\r
\r
* Contributors:\r
* VTT Technical Research Centre of Finland - initial API and implementation\r
*******************************************************************************/\r
-package org.simantics.sysdyn.ui.elements2;\r
+package org.simantics.sysdyn.ui.elements2.connections;\r
\r
import java.awt.geom.Rectangle2D;\r
\r
-package org.simantics.sysdyn.ui.elements2;\r
+package org.simantics.sysdyn.ui.elements2.connections;\r
\r
public class ConnectionClasses {\r
\r
* Contributors:\r
* VTT Technical Research Centre of Finland - initial API and implementation\r
*******************************************************************************/\r
-package org.simantics.sysdyn.ui.elements2;\r
+package org.simantics.sysdyn.ui.elements2.connections;\r
\r
import java.awt.Shape;\r
import java.awt.geom.Arc2D;\r
* Contributors:\r
* VTT Technical Research Centre of Finland - initial API and implementation\r
*******************************************************************************/\r
-package org.simantics.sysdyn.ui.elements2;\r
+package org.simantics.sysdyn.ui.elements2.connections;\r
\r
import java.util.HashMap;\r
import java.util.concurrent.ConcurrentSkipListMap;\r
import org.simantics.databoard.binding.java.StringBindingDefault;\r
import org.simantics.db.AsyncReadGraph;\r
import org.simantics.db.Resource;\r
-import org.simantics.db.Statement;\r
import org.simantics.db.procedure.AsyncMultiProcedure;\r
import org.simantics.db.procedure.AsyncProcedure;\r
import org.simantics.diagram.adapter.ElementFactoryAdapter;\r
* Contributors:\r
* VTT Technical Research Centre of Finland - initial API and implementation\r
*******************************************************************************/\r
-package org.simantics.sysdyn.ui.elements2;\r
+package org.simantics.sysdyn.ui.elements2.connections;\r
\r
import java.awt.BasicStroke;\r
import java.awt.Color;\r
* Contributors:\r
* VTT Technical Research Centre of Finland - initial API and implementation\r
*******************************************************************************/\r
-package org.simantics.sysdyn.ui.elements2;\r
+package org.simantics.sysdyn.ui.elements2.connections;\r
\r
import org.simantics.db.AsyncReadGraph;\r
import org.simantics.db.Resource;\r
-package org.simantics.sysdyn.ui.elements2;\r
+package org.simantics.sysdyn.ui.elements2.connections;\r
\r
import java.awt.BasicStroke;\r
import java.awt.Color;\r
import org.simantics.scenegraph.ISelectionPainterNode;\r
import org.simantics.scenegraph.g2d.events.SGMouseEvent;\r
import org.simantics.scenegraph.utils.NodeUtil;\r
+import org.simantics.sysdyn.ui.elements2.GraphPropertyNode;\r
import org.simantics.utils.datastructures.Pair;\r
\r
public class DependencyNode extends GraphPropertyNode implements ISelectionPainterNode {\r
* Contributors:\r
* VTT Technical Research Centre of Finland - initial API and implementation\r
*******************************************************************************/\r
-package org.simantics.sysdyn.ui.elements2;\r
+package org.simantics.sysdyn.ui.elements2.connections;\r
\r
import org.simantics.db.AsyncReadGraph;\r
import org.simantics.db.Resource;\r
* Contributors:\r
* VTT Technical Research Centre of Finland - initial API and implementation\r
*******************************************************************************/\r
-package org.simantics.sysdyn.ui.elements2;\r
+package org.simantics.sysdyn.ui.elements2.connections;\r
\r
import java.awt.BasicStroke;\r
import java.awt.Color;\r
import org.simantics.g2d.element.handler.impl.SimpleElementLayers;\r
import org.simantics.g2d.elementclass.connection.EdgeClass.EdgeHandler;\r
import org.simantics.g2d.elementclass.connection.EdgeClass.FixedTransform;\r
-import org.simantics.g2d.elementclass.valve.ValveClass.ValveHandle;\r
import org.simantics.scenegraph.g2d.G2DParentNode;\r
import org.simantics.sysdyn.ui.elements2.ValveFactory.ValveSceneGraph;\r
import org.simantics.utils.datastructures.Callback;\r
* Contributors:\r
* VTT Technical Research Centre of Finland - initial API and implementation\r
*******************************************************************************/\r
-package org.simantics.sysdyn.ui.elements2;\r
+package org.simantics.sysdyn.ui.elements2.connections;\r
\r
import org.simantics.db.AsyncReadGraph;\r
import org.simantics.db.Resource;\r
-package org.simantics.sysdyn.ui.elements2;\r
+package org.simantics.sysdyn.ui.elements2.connections;\r
\r
import java.awt.BasicStroke;\r
import java.awt.Color;\r
\r
import org.simantics.scenegraph.ISelectionPainterNode;\r
import org.simantics.scenegraph.utils.NodeUtil;\r
+import org.simantics.sysdyn.ui.elements2.GraphPropertyNode;\r
import org.simantics.utils.datastructures.Pair;\r
\r
public class FlowNode extends GraphPropertyNode implements ISelectionPainterNode {\r
-package org.simantics.sysdyn.ui.elements2;\r
+package org.simantics.sysdyn.ui.elements2.connections;\r
\r
import java.awt.Shape;\r
import java.awt.Stroke;\r
* Contributors:\r
* VTT Technical Research Centre of Finland - initial API and implementation\r
*******************************************************************************/\r
-package org.simantics.sysdyn.ui.elements2;\r
+package org.simantics.sysdyn.ui.elements2.connections;\r
\r
import java.awt.Shape;\r
import java.awt.geom.Path2D;\r
* Contributors:\r
* VTT Technical Research Centre of Finland - initial API and implementation\r
*******************************************************************************/\r
-package org.simantics.sysdyn.ui.elements2;\r
+package org.simantics.sysdyn.ui.elements2.connections;\r
\r
import java.awt.Composite;\r
import java.awt.Shape;\r
import java.util.ArrayList;\r
import java.util.Collection;\r
import java.util.Collections;\r
-import java.util.HashMap;\r
import java.util.HashSet;\r
import java.util.List;\r
import java.util.Map;\r
package org.simantics.sysdyn.ui.properties;\r
\r
+import org.eclipse.jface.layout.GridDataFactory;\r
+import org.eclipse.jface.layout.GridLayoutFactory;\r
+import org.eclipse.swt.SWT;\r
import org.eclipse.swt.widgets.Composite;\r
import org.eclipse.ui.IWorkbenchSite;\r
import org.simantics.browsing.ui.swt.PropertyTabContributorImpl;\r
+import org.simantics.browsing.ui.swt.widgets.StringPropertyFactory;\r
+import org.simantics.browsing.ui.swt.widgets.StringPropertyModifier;\r
+import org.simantics.browsing.ui.swt.widgets.TrackedText;\r
import org.simantics.browsing.ui.swt.widgets.impl.WidgetSupport;\r
+import org.simantics.db.Builtins;\r
import org.simantics.db.management.ISessionContext;\r
\r
public class ModuleTab extends PropertyTabContributorImpl {\r
\r
@Override\r
public void createControls(Composite body, IWorkbenchSite site, ISessionContext context, WidgetSupport support) {\r
- \r
+ Composite composite = new Composite(body, SWT.NONE);\r
+ GridDataFactory.fillDefaults().grab(true, true).applyTo(composite);\r
+ GridLayoutFactory.fillDefaults().margins(3, 3).numColumns(6).applyTo(composite);\r
+ TrackedText nameText = new TrackedText(composite, support, SWT.BORDER);\r
+ nameText.setTextFactory(new StringPropertyFactory(Builtins.URIs.HasName));\r
+ nameText.addModifyListener(new StringPropertyModifier(context, Builtins.URIs.HasName));\r
+ GridDataFactory.fillDefaults().grab(true, false).applyTo(nameText.getWidget());\r
}\r
}\r