JBoss Tools SVN: r13319 - trunk/esb/docs/esb_ref_guide/en/modules.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2009-01-29 09:43:19 -0500 (Thu, 29 Jan 2009)
New Revision: 13319
Modified:
trunk/esb/docs/esb_ref_guide/en/modules/esb_support.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-571 - adding the marker;
Modified: trunk/esb/docs/esb_ref_guide/en/modules/esb_support.xml
===================================================================
--- trunk/esb/docs/esb_ref_guide/en/modules/esb_support.xml 2009-01-29 14:02:55 UTC (rev 13318)
+++ trunk/esb/docs/esb_ref_guide/en/modules/esb_support.xml 2009-01-29 14:43:19 UTC (rev 13319)
@@ -242,7 +242,7 @@
</section>
- <section>
+ <section role="updated">
<title>Configuring ESB Runtime in Preferences</title>
<para>In this chapter you will know how to predefine a JBoss ESB runtime on the Preferences page.</para>
15 years, 11 months
JBoss Tools SVN: r13318 - trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2009-01-29 09:02:55 -0500 (Thu, 29 Jan 2009)
New Revision: 13318
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/JSFWebHelper.java
Log:
JBIDE-3674
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/JSFWebHelper.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/JSFWebHelper.java 2009-01-29 12:24:38 UTC (rev 13317)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/JSFWebHelper.java 2009-01-29 14:02:55 UTC (rev 13318)
@@ -142,6 +142,14 @@
set.add(o);
}
}
+ XModelObject[] js = fs.getChildren("FileSystemJar");
+ for (XModelObject o: js) {
+ XModelObject c = o.getChildByPath("META-INF/faces-config.xml");
+ if(c != null && !set.contains(c)) {
+ list.add(c);
+ set.add(c);
+ }
+ }
}
public static void registerConfigFile(XModel model, String path, ConfigFilesData data) throws XModelException {
15 years, 11 months
JBoss Tools SVN: r13317 - trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2009-01-29 07:24:38 -0500 (Thu, 29 Jan 2009)
New Revision: 13317
Modified:
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/TypeInfoCollector.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3683 Fixed
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/TypeInfoCollector.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/TypeInfoCollector.java 2009-01-29 11:43:24 UTC (rev 13316)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/TypeInfoCollector.java 2009-01-29 12:24:38 UTC (rev 13317)
@@ -1074,7 +1074,7 @@
List<MemberInfo> properties = new ArrayList<MemberInfo>();
for (MethodInfo info : fMethods) {
try {
- if ((info.getSourceType()!=null && info.getSourceType().isInterface()) || (info.isPublic())
+ if (((info.getSourceType()!=null && info.getSourceType().isInterface()) || (info.isPublic()))
&& !info.isConstructor()
&& !info.isStatic() && !info.isJavaLangObject()
&& (info.isGetter() || info.isSetter())) {
15 years, 11 months
JBoss Tools SVN: r13316 - in trunk: jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/3617 and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2009-01-29 06:43:24 -0500 (Thu, 29 Jan 2009)
New Revision: 13316
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/3617/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/3617/JBIDE-3617.css
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/3617/JBIDE-3617.jsp
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE3617Test.java
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeStyleUtil.java
Log:
RESOLVED - issue JBIDE-3617: Exception is appeared if .css file has " #url " style class
https://jira.jboss.org/jira/browse/JBIDE-3617
- the patch from the JIRA-attachment of the issue has been applied
- JUnit test has been written
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/3617/JBIDE-3617.css
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/3617/JBIDE-3617.css (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/3617/JBIDE-3617.css 2009-01-29 11:43:24 UTC (rev 13316)
@@ -0,0 +1,4 @@
+#url {
+ color: blue;
+ text-decoration: underline;
+}
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/3617/JBIDE-3617.jsp
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/3617/JBIDE-3617.jsp (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/3617/JBIDE-3617.jsp 2009-01-29 11:43:24 UTC (rev 13316)
@@ -0,0 +1,12 @@
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
+<html>
+ <head>
+
+ </head>
+ <body>
+ <f:view>
+ <span id="url">ddddd</span>
+ </f:view>
+ </body>
+</html>
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java 2009-01-29 04:00:14 UTC (rev 13315)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java 2009-01-29 11:43:24 UTC (rev 13316)
@@ -49,6 +49,7 @@
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE3441Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE3473Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE3482Test;
+import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE3617Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE3632Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE675Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE788Test;
@@ -80,6 +81,7 @@
// $JUnit-BEGIN$
suite.addTestSuite(JsfComponentTest.class);
suite.addTestSuite(Jsf20ComponentContentTest.class);
+ suite.addTestSuite(JBIDE3617Test.class);
suite.addTestSuite(JBIDE3473Test.class);
suite.addTestSuite(JBIDE3441Test.class);
suite.addTestSuite(JsfJbide1467Test.class);
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE3617Test.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE3617Test.java (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE3617Test.java 2009-01-29 11:43:24 UTC (rev 13316)
@@ -0,0 +1,104 @@
+/*******************************************************************************
+* Copyright (c) 2007-2009 Red Hat, Inc.
+* Distributed under license by Red Hat, Inc. All rights reserved.
+* This program is 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
+*
+* Contributor:
+* Red Hat, Inc. - initial API and implementation
+******************************************************************************/
+package org.jboss.tools.jsf.vpe.jsf.test.jbide;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.swt.custom.StyledText;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.part.FileEditorInput;
+import org.eclipse.wst.sse.ui.internal.StructuredTextViewer;
+import org.jboss.tools.jsf.vpe.jsf.test.JsfAllTests;
+import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
+import org.jboss.tools.vpe.editor.VpeController;
+import org.jboss.tools.vpe.ui.test.TestUtil;
+import org.jboss.tools.vpe.ui.test.VpeTest;
+
+/**
+ * Test case for issue <a href='https://jira.jboss.org/jira/browse/JBIDE-3617'>JBIDE-3617</a>:
+ * Exception is appeared if .css file has " #url " style class
+ *
+ *
+ * @author yradtsevich
+ */
+public class JBIDE3617Test extends VpeTest {
+
+ private static final String TEST_FILE_NAME = "JBIDE/3617/JBIDE-3617.jsp"; //$NON-NLS-1$
+ private static final String INSERTED_STRING = "<link rel=\"stylesheet\" type=\"text/css\" media=\"print\" href=\"JBIDE-3617.css\">"; //$NON-NLS-1$
+ private static final Point INSERTION_POINT = new Point(5, 9);
+ public JBIDE3617Test(String name) {
+ super(name);
+ }
+
+ /**
+ * Tests <a href='https://jira.jboss.org/jira/browse/JBIDE-3617'>JBIDE-3617</a>
+ *
+ * @throws Throwable
+ */
+ public void testJBIDE3617() throws Throwable {
+ // wait
+ TestUtil.waitForJobs();
+
+ setException(null);
+
+ VpeController vpeController = openInVpe(JsfAllTests.IMPORT_PROJECT_NAME, TEST_FILE_NAME); //$NON-NLS-1$
+
+ StructuredTextViewer textViewer = vpeController.getSourceEditor().getTextViewer();
+
+ int offset = TestUtil.getLinePositionOffcet(textViewer, INSERTION_POINT.x, INSERTION_POINT.y);
+ // get editor control
+ StyledText styledText = textViewer.getTextWidget();
+
+ styledText.setCaretOffset(offset);
+ styledText.insert(INSERTED_STRING);
+
+ // refresh the view
+ vpeController.visualRefresh();
+ TestUtil.waitForJobs();
+ try {
+ TestUtil.delay(500);
+ } catch (Throwable e) {
+ fail("Seems like JBIDE-3617 has occured.\n" + e);//$NON-NLS-1$
+ }
+
+ if(getException()!=null) {
+ throw getException();
+ }
+ }
+
+ /**
+ * Opens specified file in VPE editor
+ *
+ * @param projectName the name of the project
+ * @param fileName the name of the file
+ *
+ * @return VpeController
+ * @throws Throwable
+ */
+ private VpeController openInVpe(String projectName, String fileName) throws Throwable {
+ // get test page path
+ IFile file = (IFile) TestUtil.getComponentPath(fileName,
+ projectName);
+ assertNotNull("Could not open specified file. componentPage = " + fileName//$NON-NLS-1$
+ + ";projectName = " + projectName, file);//$NON-NLS-1$
+
+ IEditorInput input = new FileEditorInput(file);
+
+ assertNotNull("Editor input is null", input); //$NON-NLS-1$
+
+ // open and get editor
+ JSPMultiPageEditor part = openEditor(input);
+
+ VpeController vpeController = TestUtil.getVpeController(part);
+
+ return vpeController;
+ }
+}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeStyleUtil.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeStyleUtil.java 2009-01-29 04:00:14 UTC (rev 13315)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeStyleUtil.java 2009-01-29 11:43:24 UTC (rev 13316)
@@ -360,7 +360,7 @@
int endPathIndex = urls[i].indexOf(CLOSE_BRACKET,
startPathIndex + 1);
- if (startPathIndex == -1 || endPathIndex == -1) {
+ if (startPathIndex < 0 || endPathIndex < 0) {
continue;
}
@@ -491,9 +491,14 @@
int startPathIndex = urls[i].indexOf(OPEN_BRACKET, startAttr);
int endPathIndex = urls[i].indexOf(CLOSE_BRACKET,
startPathIndex + 1);
+
+ if (startPathIndex < 0 || endPathIndex < 0) {
+ continue;
+ }
+
String filePath = urls[i].substring(startPathIndex + 1,
endPathIndex);
-
+
IFile sourceFile = null;
try {
URL url1 = new URL(href_val);
15 years, 11 months
JBoss Tools SVN: r13315 - in trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4: src/org/jboss/tools/flow/jpdl4/model and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2009-01-28 23:00:14 -0500 (Wed, 28 Jan 2009)
New Revision: 13315
Added:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/AdvancedSection.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/NameSection.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/TypeMapper.java
Removed:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/AdvancedPropertySection.java
Modified:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/plugin.xml
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/SequenceFlow.java
Log:
add name property support for sequence flow
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/plugin.xml
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/plugin.xml 2009-01-29 03:59:43 UTC (rev 13314)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/plugin.xml 2009-01-29 04:00:14 UTC (rev 13315)
@@ -227,7 +227,12 @@
</extension>
<extension point="org.eclipse.ui.views.properties.tabbed.propertyContributor">
- <propertyContributor contributorId="org.jboss.tools.flow.jpdl4.editor">
+ <propertyContributor
+ contributorId="org.jboss.tools.flow.jpdl4.editor"
+ typeMapper="org.jboss.tools.flow.jpdl4.properties.TypeMapper">
+ <propertyCategory category="general"/>
+ <propertyCategory category="details"/>
+ <propertyCategory category="graphics"/>
<propertyCategory category="advanced"/>
</propertyContributor>
</extension>
@@ -235,6 +240,21 @@
<extension point="org.eclipse.ui.views.properties.tabbed.propertyTabs">
<propertyTabs contributorId="org.jboss.tools.flow.jpdl4.editor">
<propertyTab
+ category="general"
+ id="org.jboss.tools.jpdl4.general"
+ label="General"/>
+ <propertyTab
+ afterTab="org.jboss.tools.jpdl4.general"
+ category="details"
+ id="org.jboss.tools.jpdl4.details"
+ label="Details"/>
+ <propertyTab
+ afterTab="org.jboss.tools.jpdl4.details"
+ category="graphics"
+ id="org.jboss.tools.jpdl4.graphics"
+ label="Graphics"/>
+ <propertyTab
+ afterTab="org.jboss.tools.jpdl4.graphics"
category="advanced"
id="org.jboss.tools.jpdl4.advanced"
label="Advanced"/>
@@ -244,10 +264,18 @@
<extension point="org.eclipse.ui.views.properties.tabbed.propertySections">
<propertySections contributorId="org.jboss.tools.flow.jpdl4.editor">
<propertySection
- class="org.jboss.tools.flow.jpdl4.properties.AdvancedPropertySection"
+ class="org.jboss.tools.flow.jpdl4.properties.AdvancedSection"
id="org.jboss.tools.jpdl4.advanced"
tab="org.jboss.tools.jpdl4.advanced">
- <input type="java.lang.Object"/>
+ <input type="java.lang.Object"/>
+ </propertySection>
+ <propertySection
+ class="org.jboss.tools.flow.jpdl4.properties.NameSection"
+ id="org.jboss.tools.jpdl4.name"
+ tab="org.jboss.tools.jpdl4.general">
+ <input type="org.jboss.tools.flow.jpdl4.model.SequenceFlow"/>
+ <input type="org.jboss.tools.flow.jpdl4.model.ProcessNode"/>
+ <input type="org.jboss.tools.flow.jpdl4.model.Process"/>
</propertySection>
</propertySections>
</extension>
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/SequenceFlow.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/SequenceFlow.java 2009-01-29 03:59:43 UTC (rev 13314)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/SequenceFlow.java 2009-01-29 04:00:14 UTC (rev 13315)
@@ -1,9 +1,15 @@
package org.jboss.tools.flow.jpdl4.model;
+import org.eclipse.ui.views.properties.IPropertyDescriptor;
+import org.eclipse.ui.views.properties.IPropertySource;
+import org.eclipse.ui.views.properties.TextPropertyDescriptor;
import org.jboss.tools.flow.common.model.DefaultConnection;
import org.jboss.tools.flow.common.model.Node;
+import org.jboss.tools.flow.common.properties.IPropertyId;
public class SequenceFlow extends DefaultConnection {
+
+ private String name;
public SequenceFlow() {
this(null, null);
@@ -11,6 +17,56 @@
public SequenceFlow(Node from, Node to) {
super(from, to);
+ setMetaData("propertySource", new PropertySource());
}
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ private class PropertySource implements IPropertySource, IPropertyId {
+ private IPropertyDescriptor[] propertyDescriptors = new IPropertyDescriptor[] {
+ new TextPropertyDescriptor(NAME, "Name") {}
+ };
+
+ public Object getEditableValue() {
+ return null;
+ }
+
+ public IPropertyDescriptor[] getPropertyDescriptors() {
+ return propertyDescriptors;
+ }
+
+ public Object getPropertyValue(Object id) {
+ if (NAME.equals(id)) {
+ return getName() != null ? getName() : "";
+ }
+ return null;
+ }
+
+ public boolean isPropertySet(Object id) {
+ if (NAME.equals(id)) {
+ return getName() != null;
+ }
+ return false;
+ }
+
+ public void resetPropertyValue(Object id) {
+ }
+
+ public void setPropertyValue(Object id, Object value) {
+ if (NAME.equals(id)) {
+ if (value instanceof String) {
+ setName((String)value);
+ }
+ }
+ }
+
+ }
+
}
Deleted: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/AdvancedPropertySection.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/AdvancedPropertySection.java 2009-01-29 03:59:43 UTC (rev 13314)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/AdvancedPropertySection.java 2009-01-29 04:00:14 UTC (rev 13315)
@@ -1,20 +0,0 @@
-package org.jboss.tools.flow.jpdl4.properties;
-
-import org.eclipse.gef.commands.CommandStack;
-import org.eclipse.gef.ui.properties.UndoablePropertySheetEntry;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
-
-public class AdvancedPropertySection
- extends org.eclipse.ui.views.properties.tabbed.AdvancedPropertySection {
-
- public void createControls(Composite parent,
- final TabbedPropertySheetPage atabbedPropertySheetPage) {
- super.createControls(parent, atabbedPropertySheetPage);
- if (atabbedPropertySheetPage instanceof JpdlPropertySheetPage) {
- CommandStack commandStack = ((JpdlPropertySheetPage)atabbedPropertySheetPage).getCommandStack();
- page.setRootEntry(new UndoablePropertySheetEntry(commandStack));
- }
- }
-
-}
Copied: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/AdvancedSection.java (from rev 13282, trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/AdvancedPropertySection.java)
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/AdvancedSection.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/AdvancedSection.java 2009-01-29 04:00:14 UTC (rev 13315)
@@ -0,0 +1,20 @@
+package org.jboss.tools.flow.jpdl4.properties;
+
+import org.eclipse.gef.commands.CommandStack;
+import org.eclipse.gef.ui.properties.UndoablePropertySheetEntry;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.views.properties.tabbed.AdvancedPropertySection;
+import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
+
+public class AdvancedSection extends AdvancedPropertySection {
+
+ public void createControls(Composite parent,
+ final TabbedPropertySheetPage atabbedPropertySheetPage) {
+ super.createControls(parent, atabbedPropertySheetPage);
+ if (atabbedPropertySheetPage instanceof JpdlPropertySheetPage) {
+ CommandStack commandStack = ((JpdlPropertySheetPage)atabbedPropertySheetPage).getCommandStack();
+ page.setRootEntry(new UndoablePropertySheetEntry(commandStack));
+ }
+ }
+
+}
Property changes on: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/AdvancedSection.java
___________________________________________________________________
Name: svn:mergeinfo
+
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/NameSection.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/NameSection.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/NameSection.java 2009-01-29 04:00:14 UTC (rev 13315)
@@ -0,0 +1,108 @@
+package org.jboss.tools.flow.jpdl4.properties;
+
+import java.util.EventObject;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.gef.commands.CommandStack;
+import org.eclipse.gef.commands.CommandStackListener;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.CLabel;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.views.properties.IPropertySource;
+import org.eclipse.ui.views.properties.tabbed.AbstractPropertySection;
+import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
+import org.jboss.tools.flow.common.properties.IPropertyId;
+
+public class NameSection extends AbstractPropertySection implements IPropertyId {
+
+ private Text nameText;
+ private CLabel nameLabel;
+
+ private IPropertySource input;
+ private CommandStack commandStack;
+
+ private ModifyListener nameTextModifyListener = new ModifyListener() {
+ public void modifyText(ModifyEvent arg0) {
+ if (input != null) {
+ input.setPropertyValue(NAME, nameText.getText());
+ }
+ }
+ };
+
+ private CommandStackListener commandStackListener = new CommandStackListener() {
+ public void commandStackChanged(EventObject event) {
+ refresh();
+ }
+ };
+
+ public void dispose() {
+ commandStack.removeCommandStackListener(commandStackListener);
+ super.dispose();
+ }
+
+ public void createControls(Composite parent,
+ TabbedPropertySheetPage aTabbedPropertySheetPage) {
+ super.createControls(parent, aTabbedPropertySheetPage);
+ if (aTabbedPropertySheetPage instanceof JpdlPropertySheetPage) {
+ commandStack = ((JpdlPropertySheetPage)aTabbedPropertySheetPage).getCommandStack();
+ commandStack.addCommandStackListener(commandStackListener);
+ }
+ Composite composite = getWidgetFactory()
+ .createFlatFormComposite(parent);
+ createNameLabel(composite);
+ createNameText(composite);
+ }
+
+
+ private void createNameLabel(Composite parent) {
+ nameLabel = getWidgetFactory().createCLabel(parent, "Name");
+ FormData data = new FormData();
+ data.left = new FormAttachment(0, 0);
+ data.top = new FormAttachment(0, 5);
+ nameLabel.setLayoutData(data);
+ }
+
+ private void createNameText(Composite parent) {
+ nameText = getWidgetFactory().createText(parent, "");
+ FormData data = new FormData();
+ data.top = new FormAttachment(0, 0);
+ data.left = new FormAttachment(nameLabel, 0, SWT.RIGHT);
+ data.right = new FormAttachment(100, 0);
+ nameText.setLayoutData(data);
+ }
+
+ public void setInput(IWorkbenchPart part, ISelection selection) {
+ super.setInput(part, selection);
+ if (selection instanceof IStructuredSelection) {
+ Object object = ((IStructuredSelection)selection).getFirstElement();
+ if (object instanceof IAdaptable) {
+ object = ((IAdaptable)object).getAdapter(IPropertySource.class);
+ if (object instanceof IPropertySource) {
+ input = (IPropertySource)object;
+ return;
+ }
+ }
+ }
+ input = null;
+ }
+
+ public void refresh() {
+ if (input != null) {
+ String value = (String)input.getPropertyValue(NAME);
+ nameText.removeModifyListener(nameTextModifyListener);
+ nameText.setText(value == null ? "" : value);
+ nameText.addModifyListener(nameTextModifyListener);
+ } else {
+ nameText.setText("");
+ }
+ }
+
+}
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/TypeMapper.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/TypeMapper.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/TypeMapper.java 2009-01-29 04:00:14 UTC (rev 13315)
@@ -0,0 +1,23 @@
+package org.jboss.tools.flow.jpdl4.properties;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.ui.views.properties.tabbed.AbstractTypeMapper;
+import org.jboss.tools.flow.common.wrapper.Wrapper;
+
+public class TypeMapper extends AbstractTypeMapper {
+
+ @SuppressWarnings("unchecked")
+ public Class mapType(Object object) {
+ if (object instanceof EditPart) {
+ Object wrapper = ((EditPart)object).getModel();
+ if (wrapper instanceof Wrapper) {
+ Object element = ((Wrapper)wrapper).getElement();
+ if (element != null) {
+ return element.getClass();
+ }
+ }
+ }
+ return super.mapType(object);
+ }
+
+}
15 years, 11 months
JBoss Tools SVN: r13314 - in trunk/flow/plugins/org.jboss.tools.flow.common: src/org/jboss/tools/flow/common/properties and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2009-01-28 22:59:43 -0500 (Wed, 28 Jan 2009)
New Revision: 13314
Added:
trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/properties/DefaultConnectionWrapperPropertySource.java
trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/properties/DefaultContainerWrapperPropertySource.java
trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/properties/DefaultFlowWrapperPropertySource.java
trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/properties/DefaultNodeWrapperPropertySource.java
trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/properties/IPropertyId.java
trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/properties/WrapperPropertySource.java
trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/registry/PropertySourceRegistry.java
Removed:
trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/properties/DefaultContainerPropertySource.java
trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/properties/DefaultFlowPropertySource.java
trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/properties/DefaultNodePropertySource.java
Modified:
trunk/flow/plugins/org.jboss.tools.flow.common/META-INF/MANIFEST.MF
trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/wrapper/DefaultConnectionWrapper.java
trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/wrapper/DefaultContainerWrapper.java
trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/wrapper/DefaultFlowWrapper.java
trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/wrapper/DefaultNodeWrapper.java
Log:
adding property support for elements
Modified: trunk/flow/plugins/org.jboss.tools.flow.common/META-INF/MANIFEST.MF
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common/META-INF/MANIFEST.MF 2009-01-28 22:37:43 UTC (rev 13313)
+++ trunk/flow/plugins/org.jboss.tools.flow.common/META-INF/MANIFEST.MF 2009-01-29 03:59:43 UTC (rev 13314)
@@ -23,6 +23,7 @@
org.jboss.tools.flow.common.figure,
org.jboss.tools.flow.common.model,
org.jboss.tools.flow.common.policy,
+ org.jboss.tools.flow.common.properties,
org.jboss.tools.flow.common.registry,
org.jboss.tools.flow.common.strategy,
org.jboss.tools.flow.common.wrapper
Added: trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/properties/DefaultConnectionWrapperPropertySource.java
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/properties/DefaultConnectionWrapperPropertySource.java (rev 0)
+++ trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/properties/DefaultConnectionWrapperPropertySource.java 2009-01-29 03:59:43 UTC (rev 13314)
@@ -0,0 +1,11 @@
+package org.jboss.tools.flow.common.properties;
+
+import org.jboss.tools.flow.common.wrapper.ConnectionWrapper;
+
+public class DefaultConnectionWrapperPropertySource extends WrapperPropertySource {
+
+ public DefaultConnectionWrapperPropertySource(ConnectionWrapper wrapper) {
+ super(wrapper);
+ }
+
+}
Deleted: trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/properties/DefaultContainerPropertySource.java
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/properties/DefaultContainerPropertySource.java 2009-01-28 22:37:43 UTC (rev 13313)
+++ trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/properties/DefaultContainerPropertySource.java 2009-01-29 03:59:43 UTC (rev 13314)
@@ -1,50 +0,0 @@
-package org.jboss.tools.flow.common.properties;
-
-import org.eclipse.ui.views.properties.IPropertyDescriptor;
-import org.eclipse.ui.views.properties.IPropertySource;
-import org.eclipse.ui.views.properties.TextPropertyDescriptor;
-import org.jboss.tools.flow.common.wrapper.DefaultContainerWrapper;
-
-public class DefaultContainerPropertySource implements IPropertySource {
-
- private static final String NAME = "org.jboss.tools.flow.common.model.DefaultContainer.name";
-
- private DefaultContainerWrapper wrapper = null;
- private IPropertyDescriptor[] propertyDescriptors;
-
- public DefaultContainerPropertySource(DefaultContainerWrapper wrapper) {
- this.wrapper = wrapper;
- }
- public Object getEditableValue() {
- return null;
- }
- public IPropertyDescriptor[] getPropertyDescriptors() {
- if (propertyDescriptors == null) {
- propertyDescriptors = new IPropertyDescriptor[] {
- new TextPropertyDescriptor(NAME, "Name") {}
- };
- }
- return propertyDescriptors;
- }
- public Object getPropertyValue(Object id) {
- if (NAME.equals(id)) {
- return wrapper.getName();
- }
- return null;
- }
- public boolean isPropertySet(Object id) {
- if (NAME.equals(id)) {
- return wrapper.getName() != null;
- }
- return false;
- }
- public void resetPropertyValue(Object id) {
- }
- public void setPropertyValue(Object id, Object value) {
- if (NAME.equals(id)) {
- if (value instanceof String) {
- wrapper.setName((String)value);
- }
- }
- }
-}
Copied: trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/properties/DefaultContainerWrapperPropertySource.java (from rev 12582, trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/properties/DefaultContainerPropertySource.java)
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/properties/DefaultContainerWrapperPropertySource.java (rev 0)
+++ trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/properties/DefaultContainerWrapperPropertySource.java 2009-01-29 03:59:43 UTC (rev 13314)
@@ -0,0 +1,61 @@
+package org.jboss.tools.flow.common.properties;
+
+import org.eclipse.ui.views.properties.IPropertyDescriptor;
+import org.eclipse.ui.views.properties.TextPropertyDescriptor;
+import org.jboss.tools.flow.common.wrapper.DefaultContainerWrapper;
+
+public class DefaultContainerWrapperPropertySource extends WrapperPropertySource implements IPropertyId {
+
+ private DefaultContainerWrapper wrapper = null;
+ private IPropertyDescriptor[] propertyDescriptors;
+
+ public DefaultContainerWrapperPropertySource(DefaultContainerWrapper wrapper) {
+ super(wrapper);
+ this.wrapper = wrapper;
+ }
+
+ public Object getEditableValue() {
+ return super.getEditableValue();
+ }
+
+ public IPropertyDescriptor[] getPropertyDescriptors() {
+ if (propertyDescriptors == null) {
+ propertyDescriptors = new IPropertyDescriptor[] {
+ new TextPropertyDescriptor(NAME, "Name") {}
+ };
+ propertyDescriptors = merge(propertyDescriptors, super.getPropertyDescriptors());
+ }
+ return propertyDescriptors;
+ }
+
+ public Object getPropertyValue(Object id) {
+ if (NAME.equals(id)) {
+ return wrapper.getName();
+ } else {
+ return super.getPropertyValue(id);
+ }
+ }
+
+ public boolean isPropertySet(Object id) {
+ if (NAME.equals(id)) {
+ return wrapper.getName() != null;
+ } else {
+ return super.isPropertySet(id);
+ }
+ }
+
+ public void resetPropertyValue(Object id) {
+ super.resetPropertyValue(id);
+ }
+
+ public void setPropertyValue(Object id, Object value) {
+ if (NAME.equals(id)) {
+ if (value instanceof String) {
+ wrapper.setName((String)value);
+ }
+ } else {
+ super.setPropertyValue(id, value);
+ }
+ }
+
+}
Property changes on: trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/properties/DefaultContainerWrapperPropertySource.java
___________________________________________________________________
Name: svn:mergeinfo
+
Deleted: trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/properties/DefaultFlowPropertySource.java
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/properties/DefaultFlowPropertySource.java 2009-01-28 22:37:43 UTC (rev 13313)
+++ trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/properties/DefaultFlowPropertySource.java 2009-01-29 03:59:43 UTC (rev 13314)
@@ -1,50 +0,0 @@
-package org.jboss.tools.flow.common.properties;
-
-import org.eclipse.ui.views.properties.IPropertyDescriptor;
-import org.eclipse.ui.views.properties.IPropertySource;
-import org.eclipse.ui.views.properties.TextPropertyDescriptor;
-import org.jboss.tools.flow.common.wrapper.DefaultFlowWrapper;
-
-public class DefaultFlowPropertySource implements IPropertySource {
-
- private static final String NAME = "org.jboss.tools.flow.common.model.DefaultFlow.name";
-
- private DefaultFlowWrapper wrapper = null;
- private IPropertyDescriptor[] propertyDescriptors;
-
- public DefaultFlowPropertySource(DefaultFlowWrapper wrapper) {
- this.wrapper = wrapper;
- }
- public Object getEditableValue() {
- return null;
- }
- public IPropertyDescriptor[] getPropertyDescriptors() {
- if (propertyDescriptors == null) {
- propertyDescriptors = new IPropertyDescriptor[] {
- new TextPropertyDescriptor(NAME, "Name") {}
- };
- }
- return propertyDescriptors;
- }
- public Object getPropertyValue(Object id) {
- if (NAME.equals(id)) {
- return wrapper.getName();
- }
- return null;
- }
- public boolean isPropertySet(Object id) {
- if (NAME.equals(id)) {
- return wrapper.getName() != null;
- }
- return false;
- }
- public void resetPropertyValue(Object id) {
- }
- public void setPropertyValue(Object id, Object value) {
- if (NAME.equals(id)) {
- if (value instanceof String) {
- wrapper.setName((String)value);
- }
- }
- }
-}
Copied: trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/properties/DefaultFlowWrapperPropertySource.java (from rev 12582, trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/properties/DefaultFlowPropertySource.java)
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/properties/DefaultFlowWrapperPropertySource.java (rev 0)
+++ trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/properties/DefaultFlowWrapperPropertySource.java 2009-01-29 03:59:43 UTC (rev 13314)
@@ -0,0 +1,56 @@
+package org.jboss.tools.flow.common.properties;
+
+import org.eclipse.ui.views.properties.IPropertyDescriptor;
+import org.eclipse.ui.views.properties.TextPropertyDescriptor;
+import org.jboss.tools.flow.common.wrapper.DefaultFlowWrapper;
+
+public class DefaultFlowWrapperPropertySource extends WrapperPropertySource implements IPropertyId {
+
+ private DefaultFlowWrapper wrapper = null;
+ private IPropertyDescriptor[] propertyDescriptors;
+
+ public DefaultFlowWrapperPropertySource(DefaultFlowWrapper wrapper) {
+ super(wrapper);
+ this.wrapper = (DefaultFlowWrapper)wrapper;
+ }
+
+ public IPropertyDescriptor[] getPropertyDescriptors() {
+ if (propertyDescriptors == null) {
+ propertyDescriptors = new IPropertyDescriptor[] {
+ new TextPropertyDescriptor(NAME, "Name") {}
+ };
+ propertyDescriptors = merge(propertyDescriptors, super.getPropertyDescriptors());
+ }
+ return propertyDescriptors;
+ }
+
+ public Object getPropertyValue(Object id) {
+ if (NAME.equals(id)) {
+ return wrapper.getName();
+ } else {
+ return super.getPropertyValue(id);
+ }
+ }
+
+ public boolean isPropertySet(Object id) {
+ if (NAME.equals(id)) {
+ return wrapper.getName() != null;
+ } else {
+ return super.isPropertySet(id);
+ }
+ }
+
+ public void resetPropertyValue(Object id) {
+ super.resetPropertyValue(id);
+ }
+
+ public void setPropertyValue(Object id, Object value) {
+ if (NAME.equals(id)) {
+ if (value instanceof String) {
+ wrapper.setName((String)value);
+ }
+ } else {
+ super.setPropertyValue(id, value);
+ }
+ }
+}
Property changes on: trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/properties/DefaultFlowWrapperPropertySource.java
___________________________________________________________________
Name: svn:mergeinfo
+
Deleted: trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/properties/DefaultNodePropertySource.java
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/properties/DefaultNodePropertySource.java 2009-01-28 22:37:43 UTC (rev 13313)
+++ trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/properties/DefaultNodePropertySource.java 2009-01-29 03:59:43 UTC (rev 13314)
@@ -1,50 +0,0 @@
-package org.jboss.tools.flow.common.properties;
-
-import org.eclipse.ui.views.properties.IPropertyDescriptor;
-import org.eclipse.ui.views.properties.IPropertySource;
-import org.eclipse.ui.views.properties.TextPropertyDescriptor;
-import org.jboss.tools.flow.common.wrapper.DefaultNodeWrapper;
-
-public class DefaultNodePropertySource implements IPropertySource {
-
- private static final String NAME = "org.jboss.tools.flow.common.model.DefaultNode.name";
-
- private DefaultNodeWrapper wrapper = null;
- private IPropertyDescriptor[] propertyDescriptors;
-
- public DefaultNodePropertySource(DefaultNodeWrapper wrapper) {
- this.wrapper = wrapper;
- }
- public Object getEditableValue() {
- return null;
- }
- public IPropertyDescriptor[] getPropertyDescriptors() {
- if (propertyDescriptors == null) {
- propertyDescriptors = new IPropertyDescriptor[] {
- new TextPropertyDescriptor(NAME, "Name") {}
- };
- }
- return propertyDescriptors;
- }
- public Object getPropertyValue(Object id) {
- if (NAME.equals(id)) {
- return wrapper.getName() != null ? wrapper.getName() : "";
- }
- return null;
- }
- public boolean isPropertySet(Object id) {
- if (NAME.equals(id)) {
- return wrapper.getName() != null;
- }
- return false;
- }
- public void resetPropertyValue(Object id) {
- }
- public void setPropertyValue(Object id, Object value) {
- if (NAME.equals(id)) {
- if (value instanceof String) {
- wrapper.setName((String)value);
- }
- }
- }
-}
Copied: trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/properties/DefaultNodeWrapperPropertySource.java (from rev 12582, trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/properties/DefaultNodePropertySource.java)
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/properties/DefaultNodeWrapperPropertySource.java (rev 0)
+++ trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/properties/DefaultNodeWrapperPropertySource.java 2009-01-29 03:59:43 UTC (rev 13314)
@@ -0,0 +1,60 @@
+package org.jboss.tools.flow.common.properties;
+
+import org.eclipse.ui.views.properties.IPropertyDescriptor;
+import org.eclipse.ui.views.properties.TextPropertyDescriptor;
+import org.jboss.tools.flow.common.wrapper.DefaultNodeWrapper;
+
+public class DefaultNodeWrapperPropertySource extends WrapperPropertySource implements IPropertyId {
+
+ private DefaultNodeWrapper wrapper = null;
+ private IPropertyDescriptor[] propertyDescriptors;
+
+ public DefaultNodeWrapperPropertySource(DefaultNodeWrapper wrapper) {
+ super(wrapper);
+ this.wrapper = wrapper;
+ }
+
+ public Object getEditableValue() {
+ return super.getEditableValue();
+ }
+
+ public IPropertyDescriptor[] getPropertyDescriptors() {
+ if (propertyDescriptors == null) {
+ propertyDescriptors = new IPropertyDescriptor[] {
+ new TextPropertyDescriptor(NAME, "Name") {}
+ };
+ propertyDescriptors = merge(propertyDescriptors, super.getPropertyDescriptors());
+ }
+ return propertyDescriptors;
+ }
+
+ public Object getPropertyValue(Object id) {
+ if (NAME.equals(id)) {
+ return wrapper.getName() != null ? wrapper.getName() : "";
+ } else {
+ return super.getPropertyValue(id);
+ }
+ }
+
+ public boolean isPropertySet(Object id) {
+ if (NAME.equals(id)) {
+ return wrapper.getName() != null;
+ } else {
+ return super.isPropertySet(id);
+ }
+ }
+
+ public void resetPropertyValue(Object id) {
+ super.resetPropertyValue(id);
+ }
+
+ public void setPropertyValue(Object id, Object value) {
+ if (NAME.equals(id)) {
+ if (value instanceof String) {
+ wrapper.setName((String)value);
+ }
+ } else {
+ super.setPropertyValue(id, value);
+ }
+ }
+}
Property changes on: trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/properties/DefaultNodeWrapperPropertySource.java
___________________________________________________________________
Name: svn:mergeinfo
+
Added: trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/properties/IPropertyId.java
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/properties/IPropertyId.java (rev 0)
+++ trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/properties/IPropertyId.java 2009-01-29 03:59:43 UTC (rev 13314)
@@ -0,0 +1,7 @@
+package org.jboss.tools.flow.common.properties;
+
+public interface IPropertyId {
+
+ String NAME = "org.jboss.tools.flow.common.model.name";
+
+}
Added: trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/properties/WrapperPropertySource.java
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/properties/WrapperPropertySource.java (rev 0)
+++ trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/properties/WrapperPropertySource.java 2009-01-29 03:59:43 UTC (rev 13314)
@@ -0,0 +1,75 @@
+package org.jboss.tools.flow.common.properties;
+
+import java.util.Arrays;
+import java.util.List;
+
+import org.eclipse.ui.views.properties.IPropertyDescriptor;
+import org.eclipse.ui.views.properties.IPropertySource;
+import org.jboss.tools.flow.common.wrapper.Wrapper;
+
+public class WrapperPropertySource implements IPropertySource {
+
+ private Wrapper wrapper;
+ private IPropertySource elementPropertySource;
+
+ public WrapperPropertySource(Wrapper wrapper) {
+ this.wrapper = wrapper;
+ if (wrapper != null && wrapper.getElement() != null) {
+ Object object = wrapper.getElement().getMetaData("propertySource");
+ if (object != null && object instanceof IPropertySource) {
+ elementPropertySource = (IPropertySource)object;
+ }
+ }
+ }
+
+ public Object getEditableValue() {
+ if (elementPropertySource != null) {
+ return elementPropertySource.getEditableValue();
+ }
+ return null;
+ }
+
+ public IPropertyDescriptor[] getPropertyDescriptors() {
+ if (elementPropertySource != null) {
+ return elementPropertySource.getPropertyDescriptors();
+ }
+ return new IPropertyDescriptor[0];
+ }
+
+ public Object getPropertyValue(Object id) {
+ if (elementPropertySource != null) {
+ return elementPropertySource.getPropertyValue(id);
+ }
+ return null;
+ }
+
+ public boolean isPropertySet(Object id) {
+ if (elementPropertySource != null) {
+ return elementPropertySource.isPropertySet(id);
+ }
+ return false;
+ }
+
+ public void resetPropertyValue(Object id) {
+ if (elementPropertySource != null) {
+ elementPropertySource.resetPropertyValue(id);
+ }
+ }
+
+ public void setPropertyValue(Object id, Object value) {
+ if (elementPropertySource != null) {
+ elementPropertySource.setPropertyValue(id, value);
+ }
+ }
+
+ protected Wrapper getWrapper() {
+ return wrapper;
+ }
+
+ protected IPropertyDescriptor[] merge(IPropertyDescriptor[] first, IPropertyDescriptor[] second) {
+ List<IPropertyDescriptor> result = Arrays.asList(first);
+ result.addAll(Arrays.asList(second));
+ return (IPropertyDescriptor[])result.toArray();
+ }
+
+}
Added: trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/registry/PropertySourceRegistry.java
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/registry/PropertySourceRegistry.java (rev 0)
+++ trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/registry/PropertySourceRegistry.java 2009-01-29 03:59:43 UTC (rev 13314)
@@ -0,0 +1,5 @@
+package org.jboss.tools.flow.common.registry;
+
+public class PropertySourceRegistry {
+
+}
Modified: trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/wrapper/DefaultConnectionWrapper.java
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/wrapper/DefaultConnectionWrapper.java 2009-01-28 22:37:43 UTC (rev 13313)
+++ trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/wrapper/DefaultConnectionWrapper.java 2009-01-29 03:59:43 UTC (rev 13314)
@@ -5,13 +5,17 @@
import java.util.List;
import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.ui.views.properties.IPropertySource;
import org.jboss.tools.flow.common.model.Connection;
import org.jboss.tools.flow.common.model.DefaultConnection;
import org.jboss.tools.flow.common.model.Node;
+import org.jboss.tools.flow.common.properties.DefaultConnectionWrapperPropertySource;
public class DefaultConnectionWrapper extends AbstractConnectionWrapper {
+ private DefaultConnectionWrapperPropertySource propertySource;
+
public Connection getConnection() {
return (Connection)getElement();
}
@@ -74,4 +78,20 @@
}
return result;
}
+
+ @SuppressWarnings("unchecked")
+ public Object getAdapter(Class adapter) {
+ if (adapter == IPropertySource.class) {
+ return getPropertySource();
+ }
+ return super.getAdapter(adapter);
+ }
+
+ private IPropertySource getPropertySource() {
+ if (propertySource == null) {
+ propertySource = new DefaultConnectionWrapperPropertySource(this);
+ }
+ return propertySource;
+ }
+
}
Modified: trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/wrapper/DefaultContainerWrapper.java
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/wrapper/DefaultContainerWrapper.java 2009-01-28 22:37:43 UTC (rev 13313)
+++ trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/wrapper/DefaultContainerWrapper.java 2009-01-29 03:59:43 UTC (rev 13314)
@@ -8,7 +8,7 @@
import org.jboss.tools.flow.common.model.Container;
import org.jboss.tools.flow.common.model.Flow;
import org.jboss.tools.flow.common.model.Node;
-import org.jboss.tools.flow.common.properties.DefaultContainerPropertySource;
+import org.jboss.tools.flow.common.properties.DefaultContainerWrapperPropertySource;
import org.jboss.tools.flow.common.strategy.AcceptsElementStrategy;
import org.jboss.tools.flow.common.strategy.AcceptsIncomingConnectionStrategy;
import org.jboss.tools.flow.common.strategy.AcceptsOutgoingConnectionStrategy;
@@ -18,7 +18,7 @@
private AcceptsElementStrategy acceptsElementStrategy;
private AcceptsIncomingConnectionStrategy incomingConnectionStrategy;
private AcceptsOutgoingConnectionStrategy outgoingConnectionStrategy;
- private DefaultContainerPropertySource propertySource;
+ private DefaultContainerWrapperPropertySource propertySource;
protected void internalSetName(String name) {
getNode().setName(name);
@@ -134,7 +134,7 @@
private IPropertySource getPropertySource() {
if (propertySource == null) {
- propertySource = new DefaultContainerPropertySource(this);
+ propertySource = new DefaultContainerWrapperPropertySource(this);
}
return propertySource;
}
Modified: trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/wrapper/DefaultFlowWrapper.java
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/wrapper/DefaultFlowWrapper.java 2009-01-28 22:37:43 UTC (rev 13313)
+++ trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/wrapper/DefaultFlowWrapper.java 2009-01-29 03:59:43 UTC (rev 13314)
@@ -4,13 +4,13 @@
import org.jboss.tools.flow.common.model.DefaultFlow;
import org.jboss.tools.flow.common.model.Flow;
import org.jboss.tools.flow.common.model.Node;
-import org.jboss.tools.flow.common.properties.DefaultFlowPropertySource;
+import org.jboss.tools.flow.common.properties.DefaultFlowWrapperPropertySource;
import org.jboss.tools.flow.common.strategy.AcceptsElementStrategy;
public class DefaultFlowWrapper extends AbstractFlowWrapper {
private AcceptsElementStrategy acceptsElementStrategy;
- private DefaultFlowPropertySource propertySource;
+ private DefaultFlowWrapperPropertySource propertySource;
public String getName() {
return ((DefaultFlow)getElement()).getName();
@@ -72,7 +72,7 @@
private IPropertySource getPropertySource() {
if (propertySource == null) {
- propertySource = new DefaultFlowPropertySource(this);
+ propertySource = new DefaultFlowWrapperPropertySource(this);
}
return propertySource;
}
Modified: trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/wrapper/DefaultNodeWrapper.java
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/wrapper/DefaultNodeWrapper.java 2009-01-28 22:37:43 UTC (rev 13313)
+++ trunk/flow/plugins/org.jboss.tools.flow.common/src/org/jboss/tools/flow/common/wrapper/DefaultNodeWrapper.java 2009-01-29 03:59:43 UTC (rev 13314)
@@ -4,7 +4,7 @@
import org.eclipse.ui.views.properties.IPropertySource;
import org.jboss.tools.flow.common.model.Connection;
import org.jboss.tools.flow.common.model.Node;
-import org.jboss.tools.flow.common.properties.DefaultNodePropertySource;
+import org.jboss.tools.flow.common.properties.DefaultNodeWrapperPropertySource;
import org.jboss.tools.flow.common.strategy.AcceptsIncomingConnectionStrategy;
import org.jboss.tools.flow.common.strategy.AcceptsOutgoingConnectionStrategy;
@@ -12,7 +12,7 @@
private AcceptsIncomingConnectionStrategy incomingConnectionStrategy;
private AcceptsOutgoingConnectionStrategy outgoingConnectionStrategy;
- private DefaultNodePropertySource propertySource;
+ private DefaultNodeWrapperPropertySource propertySource;
public void setNode(Node node) {
setElement(node);
@@ -117,7 +117,7 @@
private IPropertySource getPropertySource() {
if (propertySource == null) {
- propertySource = new DefaultNodePropertySource(this);
+ propertySource = new DefaultNodeWrapperPropertySource(this);
}
return propertySource;
}
15 years, 11 months
JBoss Tools SVN: r13313 - trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/internal.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2009-01-28 17:37:43 -0500 (Wed, 28 Jan 2009)
New Revision: 13313
Modified:
trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/internal/PortletRuntimeLibrariesContainerInitializer.java
Log:
JBIDE-3660 Portlet facet doesn't recognize JBoss Portal server within EPP distribution
Modified: trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/internal/PortletRuntimeLibrariesContainerInitializer.java
===================================================================
--- trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/internal/PortletRuntimeLibrariesContainerInitializer.java 2009-01-28 21:23:36 UTC (rev 13312)
+++ trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/internal/PortletRuntimeLibrariesContainerInitializer.java 2009-01-28 22:37:43 UTC (rev 13313)
@@ -18,6 +18,7 @@
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform;
import org.eclipse.jdt.core.IAccessRule;
@@ -30,6 +31,8 @@
import org.jboss.ide.eclipse.as.classpath.core.jee.AbstractClasspathContainer;
import org.jboss.ide.eclipse.as.classpath.core.jee.AbstractClasspathContainerInitializer;
import org.jboss.ide.eclipse.as.classpath.core.xpl.ClasspathDecorations;
+import org.jboss.ide.eclipse.as.core.server.IJBossServerConstants;
+import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
import org.jboss.tools.portlet.core.IPortletConstants;
import org.jboss.tools.portlet.core.Messages;
import org.jboss.tools.portlet.core.PortletCoreActivator;
@@ -146,22 +149,52 @@
}
private File getLibDirectory(File location) {
- File libDirectory = getDirectory(location,
- IPortletConstants.SERVER_DEFAULT_DEPLOY_JBOSS_PORTAL_SAR);
- if (libDirectory != null) {
- libDirectory = new File(libDirectory, "lib"); //$NON-NLS-1$
- } else {
- libDirectory = getDirectory(location,
- IPortletConstants.SERVER_DEFAULT_DEPLOY_SIMPLE_PORTAL);
+ IJavaProject javaProject = getProject();
+ if (javaProject == null) {
+ return null;
+ }
+ IProject project = javaProject.getProject();
+ if (project == null) {
+ return null;
+ }
+ IRuntime runtime = null;
+ try {
+ runtime = J2EEProjectUtilities.getServerRuntime(project);
+ } catch (CoreException e) {
+ // ignore
+ }
+ if (runtime == null) {
+ return null;
+ }
+ File libDirectory = null;
+ IJBossServerRuntime jbossRuntime = (IJBossServerRuntime)runtime.loadAdapter(IJBossServerRuntime.class, new NullProgressMonitor());
+ if (jbossRuntime != null) {
+ // JBoss Portal server
+ IPath jbossLocation = runtime.getLocation();
+ IPath configPath = jbossLocation.append(IJBossServerConstants.SERVER).append(jbossRuntime.getJBossConfiguration());
+ location = configPath.toFile();
+ libDirectory = getDirectory(location,IPortletConstants.SERVER_DEFAULT_DEPLOY_JBOSS_PORTAL_SAR);
if (libDirectory != null) {
libDirectory = new File(libDirectory, "lib"); //$NON-NLS-1$
} else {
- // Tomcat adds portlet-api.jat automatically
- /*File tomcatLib = new File(location,
+ libDirectory = getDirectory(location,
+ IPortletConstants.SERVER_DEFAULT_DEPLOY_SIMPLE_PORTAL);
+ if (libDirectory != null) {
+ libDirectory = new File(libDirectory, "lib"); //$NON-NLS-1$
+ } else {
+ libDirectory = getDirectory(location,
+ IPortletConstants.SERVER_DEFAULT_DEPLOY_JBOSS_PORTAL_HA_SAR);
+ if (libDirectory != null) {
+ libDirectory = new File(libDirectory, "lib"); //$NON-NLS-1$
+ } else {
+ // Tomcat adds portlet-api.jat automatically
+ /*File tomcatLib = new File(location,
IPortletConstants.TOMCAT_LIB);
- if (tomcatLib != null && tomcatLib.isDirectory()) {
- libDirectory = tomcatLib;
- }*/
+ if (tomcatLib != null && tomcatLib.isDirectory()) {
+ libDirectory = tomcatLib;
+ }*/
+ }
+ }
}
}
return libDirectory;
15 years, 11 months
JBoss Tools SVN: r13311 - tags.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2009-01-28 14:04:26 -0500 (Wed, 28 Jan 2009)
New Revision: 13311
Added:
tags/jbosstools-3.0.0.CR2/
Log:
tag jbosstools-3.0.0.CR2
Copied: tags/jbosstools-3.0.0.CR2 (from rev 13310, branches/jbosstools-3.0.0.CR2)
15 years, 11 months
JBoss Tools SVN: r13310 - trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2009-01-28 13:32:50 -0500 (Wed, 28 Jan 2009)
New Revision: 13310
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesEditorTemplate.java
Log:
RESOLVED - issue JBIDE-3653: inFlasher doesn't shows for rich:editor component
https://jira.jboss.org/jira/browse/JBIDE-3653
- style attribute 'display:table;' has been set to the main (container) tag
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesEditorTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesEditorTemplate.java 2009-01-28 18:12:33 UTC (rev 13309)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesEditorTemplate.java 2009-01-28 18:32:50 UTC (rev 13310)
@@ -72,7 +72,10 @@
ComponentUtil.setCSSLink(pageContext, STYLE_PATH, "editor"); //$NON-NLS-1$
// create nodes
nsIDOMElement mainSpan = visualDocument.createElement(HTML.TAG_SPAN); {
- mainSpan.setAttribute(HTML.ATTR_CLASS, "richfacesSimpleSkin");
+ mainSpan.setAttribute(HTML.ATTR_CLASS, "richfacesSimpleSkin"); //$NON-NLS-1$
+
+ // Yahor Radtsevich: Fix of JBIDE-3653: inFlasher doesn't shows for rich:editor component
+ mainSpan.setAttribute(HTML.ATTR_STYLE, "display: table;"); //$NON-NLS-1$
}
nsIDOMElement mainTable = createMainTable();
nsIDOMElement textContainer = createTextContainer();
15 years, 11 months