JBoss Tools SVN: r8602 - trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-06-06 06:02:36 -0400 (Fri, 06 Jun 2008)
New Revision: 8602
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/PagesNodeEditPolicy.java
Log:
JBIDE-1189
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/PagesNodeEditPolicy.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/PagesNodeEditPolicy.java 2008-06-06 10:00:24 UTC (rev 8601)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/PagesNodeEditPolicy.java 2008-06-06 10:02:36 UTC (rev 8602)
@@ -84,7 +84,7 @@
}
ConnectionCommand command = new ConnectionCommand();
command.setLink(null);
- command.setSource((PageEditPart) getPagesEditPart());
+ command.setSource((PagesEditPart) getPagesEditPart());
ConnectionAnchor ancor = getPagesEditPart().getSourceConnectionAnchor(
request);
command.setSourceTerminal(getPagesEditPart()
15 years, 11 months
JBoss Tools SVN: r8601 - in trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor: ecore and 5 other directories.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2008-06-06 06:00:24 -0400 (Fri, 06 Jun 2008)
New Revision: 8601
Added:
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/PageException.java
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/PageExceptionImpl.java
Removed:
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/PgException.java
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/PgExceptionImpl.java
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/SeamPagesGuiEditor.java
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages.ecore
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages.genmodel
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/PagesFactory.java
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/PagesPackage.java
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/PagesFactoryImpl.java
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/PagesModelImpl.java
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/PagesPackageImpl.java
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/util/PagesAdapterFactory.java
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/util/PagesSwitch.java
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/ExceptionEditPart.java
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/GraphicalPartFactory.java
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/PageEditPart.java
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/PagesEditPart.java
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/PagesXYLayoutEditPolicy.java
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/ParamEditPart.java
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/ParamListEditPart.java
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/ExceptionFigure.java
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/FigureFactory.java
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/NodeFigure.java
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/PageFigure.java
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/ParamFigure.java
Log:
JBIDE-2280 cleanup of constants, arrow for links and PgException -> PageException
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/SeamPagesGuiEditor.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/SeamPagesGuiEditor.java 2008-06-06 09:57:23 UTC (rev 8600)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/SeamPagesGuiEditor.java 2008-06-06 10:00:24 UTC (rev 8601)
@@ -34,7 +34,7 @@
import org.jboss.tools.seam.ui.pages.editor.ecore.pages.PagesElement;
import org.jboss.tools.seam.ui.pages.editor.ecore.pages.PagesFactory;
import org.jboss.tools.seam.ui.pages.editor.ecore.pages.PagesModel;
-import org.jboss.tools.seam.ui.pages.editor.ecore.pages.PgException;
+import org.jboss.tools.seam.ui.pages.editor.ecore.pages.PageException;
public class SeamPagesGuiEditor extends AbstractSectionEditor {
private PagesEditor gui = null;
Copied: trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/PageException.java (from rev 8594, trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/PgException.java)
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/PageException.java (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/PageException.java 2008-06-06 10:00:24 UTC (rev 8601)
@@ -0,0 +1,12 @@
+package org.jboss.tools.seam.ui.pages.editor.ecore.pages;
+
+/**
+ * @author daniel
+ *
+ * Exception model interface
+ *
+ * @model
+ */
+public interface PageException extends PagesElement{
+
+}
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/PagesFactory.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/PagesFactory.java 2008-06-06 09:57:23 UTC (rev 8600)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/PagesFactory.java 2008-06-06 10:00:24 UTC (rev 8601)
@@ -68,7 +68,7 @@
* @return a new object of class '<em>Pg Exception</em>'.
* @generated
*/
- PgException createPgException();
+ PageException createPgException();
/**
* Returns the package supported by this factory.
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/PagesPackage.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/PagesPackage.java 2008-06-06 09:57:23 UTC (rev 8600)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/PagesPackage.java 2008-06-06 10:00:24 UTC (rev 8601)
@@ -507,10 +507,10 @@
int PARAM_FEATURE_COUNT = PAGES_ELEMENT_FEATURE_COUNT + 1;
/**
- * The meta object id for the '{@link org.jboss.tools.seam.ui.pages.editor.ecore.pages.impl.PgExceptionImpl <em>Pg Exception</em>}' class.
+ * The meta object id for the '{@link org.jboss.tools.seam.ui.pages.editor.ecore.pages.impl.PageExceptionImpl <em>Pg Exception</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @see org.jboss.tools.seam.ui.pages.editor.ecore.pages.impl.PgExceptionImpl
+ * @see org.jboss.tools.seam.ui.pages.editor.ecore.pages.impl.PageExceptionImpl
* @see org.jboss.tools.seam.ui.pages.editor.ecore.pages.impl.PagesPackageImpl#getPgException()
* @generated
*/
@@ -834,11 +834,11 @@
EAttribute getParam_Value();
/**
- * Returns the meta object for class '{@link org.jboss.tools.seam.ui.pages.editor.ecore.pages.PgException <em>Pg Exception</em>}'.
+ * Returns the meta object for class '{@link org.jboss.tools.seam.ui.pages.editor.ecore.pages.PageException <em>Pg Exception</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Pg Exception</em>'.
- * @see org.jboss.tools.seam.ui.pages.editor.ecore.pages.PgException
+ * @see org.jboss.tools.seam.ui.pages.editor.ecore.pages.PageException
* @generated
*/
EClass getPgException();
@@ -1058,10 +1058,10 @@
EAttribute PARAM__VALUE = eINSTANCE.getParam_Value();
/**
- * The meta object literal for the '{@link org.jboss.tools.seam.ui.pages.editor.ecore.pages.impl.PgExceptionImpl <em>Pg Exception</em>}' class.
+ * The meta object literal for the '{@link org.jboss.tools.seam.ui.pages.editor.ecore.pages.impl.PageExceptionImpl <em>Pg Exception</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @see org.jboss.tools.seam.ui.pages.editor.ecore.pages.impl.PgExceptionImpl
+ * @see org.jboss.tools.seam.ui.pages.editor.ecore.pages.impl.PageExceptionImpl
* @see org.jboss.tools.seam.ui.pages.editor.ecore.pages.impl.PagesPackageImpl#getPgException()
* @generated
*/
Deleted: trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/PgException.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/PgException.java 2008-06-06 09:57:23 UTC (rev 8600)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/PgException.java 2008-06-06 10:00:24 UTC (rev 8601)
@@ -1,12 +0,0 @@
-package org.jboss.tools.seam.ui.pages.editor.ecore.pages;
-
-/**
- * @author daniel
- *
- * Exception model interface
- *
- * @model
- */
-public interface PgException extends PagesElement{
-
-}
Copied: trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/PageExceptionImpl.java (from rev 8594, trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/PgExceptionImpl.java)
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/PageExceptionImpl.java (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/PageExceptionImpl.java 2008-06-06 10:00:24 UTC (rev 8601)
@@ -0,0 +1,68 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.seam.ui.pages.editor.ecore.pages.impl;
+
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.emf.ecore.EClass;
+
+import org.jboss.tools.common.model.XModelObject;
+import org.jboss.tools.seam.pages.xml.model.helpers.SeamPagesDiagramStructureHelper;
+import org.jboss.tools.seam.ui.pages.editor.ecore.pages.PagesPackage;
+import org.jboss.tools.seam.ui.pages.editor.ecore.pages.PageException;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Pg Exception</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class PageExceptionImpl extends PagesElementImpl implements PageException {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PageExceptionImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return PagesPackage.Literals.PG_EXCEPTION;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public void dataChanged() {
+ XModelObject item = getModelObject();
+ SeamPagesDiagramStructureHelper h = SeamPagesDiagramStructureHelper.getInstance();
+
+ setName(item.getPresentationString());
+ int[] shape = h.asIntArray(item, "shape");
+ if(shape != null && shape.length >= 2) {
+ setLocation(new Point(shape[0],shape[1]));
+ } else {
+ setLocation(new Point(0,0));
+ }
+ if(shape != null && shape.length >= 4) {
+ setSize(new Dimension(shape[2],shape[3]));
+ }
+ }
+
+} //PgExceptionImpl
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/PagesFactoryImpl.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/PagesFactoryImpl.java 2008-06-06 09:57:23 UTC (rev 8600)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/PagesFactoryImpl.java 2008-06-06 10:00:24 UTC (rev 8601)
@@ -153,8 +153,8 @@
* <!-- end-user-doc -->
* @generated
*/
- public PgException createPgException() {
- PgExceptionImpl pgException = new PgExceptionImpl();
+ public PageException createPgException() {
+ PageExceptionImpl pgException = new PageExceptionImpl();
return pgException;
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/PagesModelImpl.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/PagesModelImpl.java 2008-06-06 09:57:23 UTC (rev 8600)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/PagesModelImpl.java 2008-06-06 10:00:24 UTC (rev 8601)
@@ -26,7 +26,7 @@
import org.jboss.tools.seam.ui.pages.editor.ecore.pages.PagesFactory;
import org.jboss.tools.seam.ui.pages.editor.ecore.pages.PagesModel;
import org.jboss.tools.seam.ui.pages.editor.ecore.pages.PagesPackage;
-import org.jboss.tools.seam.ui.pages.editor.ecore.pages.PgException;
+import org.jboss.tools.seam.ui.pages.editor.ecore.pages.PageException;
/**
* <!-- begin-user-doc -->
@@ -233,7 +233,7 @@
page.dataChanged();
getChildren().add(page);
} else if(SeamPagesConstants.TYPE_EXCEPTION.equals(type)) {
- PgException exc = PagesFactory.eINSTANCE.createPgException();
+ PageException exc = PagesFactory.eINSTANCE.createPgException();
bindElement(item, exc);
exc.dataChanged();
getChildren().add(exc);
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/PagesPackageImpl.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/PagesPackageImpl.java 2008-06-06 09:57:23 UTC (rev 8600)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/PagesPackageImpl.java 2008-06-06 10:00:24 UTC (rev 8601)
@@ -24,7 +24,7 @@
import org.jboss.tools.seam.ui.pages.editor.ecore.pages.PagesModel;
import org.jboss.tools.seam.ui.pages.editor.ecore.pages.PagesPackage;
import org.jboss.tools.seam.ui.pages.editor.ecore.pages.Param;
-import org.jboss.tools.seam.ui.pages.editor.ecore.pages.PgException;
+import org.jboss.tools.seam.ui.pages.editor.ecore.pages.PageException;
/**
* <!-- begin-user-doc -->
@@ -483,7 +483,7 @@
initEClass(paramEClass, Param.class, "Param", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getParam_Value(), ecorePackage.getEString(), "value", null, 0, 1, Param.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEClass(pgExceptionEClass, PgException.class, "PgException", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEClass(pgExceptionEClass, PageException.class, "PgException", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
// Initialize data types
initEDataType(pointEDataType, Point.class, "Point", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS);
Deleted: trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/PgExceptionImpl.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/PgExceptionImpl.java 2008-06-06 09:57:23 UTC (rev 8600)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/PgExceptionImpl.java 2008-06-06 10:00:24 UTC (rev 8601)
@@ -1,68 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.jboss.tools.seam.ui.pages.editor.ecore.pages.impl;
-
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.emf.ecore.EClass;
-
-import org.jboss.tools.common.model.XModelObject;
-import org.jboss.tools.seam.pages.xml.model.helpers.SeamPagesDiagramStructureHelper;
-import org.jboss.tools.seam.ui.pages.editor.ecore.pages.PagesPackage;
-import org.jboss.tools.seam.ui.pages.editor.ecore.pages.PgException;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Pg Exception</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * </p>
- *
- * @generated
- */
-public class PgExceptionImpl extends PagesElementImpl implements PgException {
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected PgExceptionImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return PagesPackage.Literals.PG_EXCEPTION;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated NOT
- */
- public void dataChanged() {
- XModelObject item = getModelObject();
- SeamPagesDiagramStructureHelper h = SeamPagesDiagramStructureHelper.getInstance();
-
- setName(item.getPresentationString());
- int[] shape = h.asIntArray(item, "shape");
- if(shape != null && shape.length >= 2) {
- setLocation(new Point(shape[0],shape[1]));
- } else {
- setLocation(new Point(0,0));
- }
- if(shape != null && shape.length >= 4) {
- setSize(new Dimension(shape[2],shape[3]));
- }
- }
-
-} //PgExceptionImpl
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/util/PagesAdapterFactory.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/util/PagesAdapterFactory.java 2008-06-06 09:57:23 UTC (rev 8600)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/util/PagesAdapterFactory.java 2008-06-06 10:00:24 UTC (rev 8601)
@@ -92,7 +92,7 @@
return createParamAdapter();
}
@Override
- public Adapter casePgException(PgException object) {
+ public Adapter casePgException(PageException object) {
return createPgExceptionAdapter();
}
@Override
@@ -186,13 +186,13 @@
}
/**
- * Creates a new adapter for an object of class '{@link org.jboss.tools.seam.ui.pages.editor.ecore.pages.PgException <em>Pg Exception</em>}'.
+ * Creates a new adapter for an object of class '{@link org.jboss.tools.seam.ui.pages.editor.ecore.pages.PageException <em>Pg Exception</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
- * @see org.jboss.tools.seam.ui.pages.editor.ecore.pages.PgException
+ * @see org.jboss.tools.seam.ui.pages.editor.ecore.pages.PageException
* @generated
*/
public Adapter createPgExceptionAdapter() {
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/util/PagesSwitch.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/util/PagesSwitch.java 2008-06-06 09:57:23 UTC (rev 8600)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/util/PagesSwitch.java 2008-06-06 10:00:24 UTC (rev 8601)
@@ -121,7 +121,7 @@
return result;
}
case PagesPackage.PG_EXCEPTION: {
- PgException pgException = (PgException)theEObject;
+ PageException pgException = (PageException)theEObject;
T result = casePgException(pgException);
if (result == null) result = casePagesElement(pgException);
if (result == null) result = defaultCase(theEObject);
@@ -217,7 +217,7 @@
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
- public T casePgException(PgException object) {
+ public T casePgException(PageException object) {
return null;
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages.ecore
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages.ecore 2008-06-06 09:57:23 UTC (rev 8600)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages.ecore 2008-06-06 10:00:24 UTC (rev 8601)
@@ -1,39 +1,39 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ecore:EPackage xmi:version="2.0"
- xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="pages"
- nsURI="http:///org/jboss/tools/seam/ui/pages/editor/ecore/pages.ecore" nsPrefix="org.jboss.tools.seam.ui.pages.editor.ecore.pages">
- <eClassifiers xsi:type="ecore:EClass" name="Link">
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="fromElement" eType="#//PagesElement"
- eOpposite="#//PagesElement/outputLinks"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="toElement" eType="#//PagesElement"
- eOpposite="#//PagesElement/inputLinks"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="shortcut" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="data" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"/>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="Page" eSuperTypes="#//PagesElement">
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="paramsVisible" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="PagesElement" abstract="true">
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="location" eType="#//Point"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="size" eType="#//Dimension"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="children" upperBound="-1"
- eType="#//PagesElement" eOpposite="#//PagesElement/parent"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="parent" eType="#//PagesElement"
- eOpposite="#//PagesElement/children"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="inputLinks" upperBound="-1"
- eType="#//Link" eOpposite="#//Link/toElement"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="outputLinks" upperBound="-1"
- eType="#//Link" eOpposite="#//Link/fromElement"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="data" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"/>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="PagesModel" eSuperTypes="#//PagesElement"/>
- <eClassifiers xsi:type="ecore:EClass" name="Param" eSuperTypes="#//PagesElement">
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="PgException" eSuperTypes="#//PagesElement"/>
- <eClassifiers xsi:type="ecore:EDataType" name="Point" instanceClassName="org.eclipse.draw2d.geometry.Point"/>
- <eClassifiers xsi:type="ecore:EDataType" name="Dimension" instanceClassName="org.eclipse.draw2d.geometry.Dimension"/>
-</ecore:EPackage>
+<?xml version="1.0" encoding="UTF-8"?>
+<ecore:EPackage xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="pages"
+ nsURI="http:///org/jboss/tools/seam/ui/pages/editor/ecore/pages.ecore" nsPrefix="org.jboss.tools.seam.ui.pages.editor.ecore.pages">
+ <eClassifiers xsi:type="ecore:EClass" name="Link">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="fromElement" eType="#//PagesElement"
+ eOpposite="#//PagesElement/outputLinks"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="toElement" eType="#//PagesElement"
+ eOpposite="#//PagesElement/inputLinks"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="shortcut" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="data" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Page" eSuperTypes="#//PagesElement">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="paramsVisible" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="PagesElement" abstract="true">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="location" eType="#//Point"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="size" eType="#//Dimension"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="children" upperBound="-1"
+ eType="#//PagesElement" eOpposite="#//PagesElement/parent"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="parent" eType="#//PagesElement"
+ eOpposite="#//PagesElement/children"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="inputLinks" upperBound="-1"
+ eType="#//Link" eOpposite="#//Link/toElement"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="outputLinks" upperBound="-1"
+ eType="#//Link" eOpposite="#//Link/fromElement"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="data" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="PagesModel" eSuperTypes="#//PagesElement"/>
+ <eClassifiers xsi:type="ecore:EClass" name="Param" eSuperTypes="#//PagesElement">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EDataType" name="Point" instanceClassName="org.eclipse.draw2d.geometry.Point"/>
+ <eClassifiers xsi:type="ecore:EDataType" name="Dimension" instanceClassName="org.eclipse.draw2d.geometry.Dimension"/>
+ <eClassifiers xsi:type="ecore:EClass" name="PageException" eSuperTypes="#//PagesElement"/>
+</ecore:EPackage>
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages.genmodel
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages.genmodel 2008-06-06 09:57:23 UTC (rev 8600)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages.genmodel 2008-06-06 10:00:24 UTC (rev 8601)
@@ -1,38 +1,38 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<genmodel:GenModel xmi:version="2.0"
- xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
- xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/org.jboss.tools.seam.ui.pages/src"
- modelPluginID="org.jboss.tools.seam.ui.pages" modelName="Pages" importerID="org.eclipse.emf.importer.java"
- complianceLevel="5.0" copyrightFields="false">
- <foreignModel>@model</foreignModel>
- <genPackages prefix="Pages" basePackage="org.jboss.tools.seam.ui.pages.editor.ecore"
- disposableProviderFactory="true" ecorePackage="pages.ecore#/">
- <genDataTypes ecoreDataType="pages.ecore#//Point"/>
- <genDataTypes ecoreDataType="pages.ecore#//Dimension"/>
- <genClasses ecoreClass="pages.ecore#//Link">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute pages.ecore#//Link/name"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference pages.ecore#//Link/fromElement"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference pages.ecore#//Link/toElement"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute pages.ecore#//Link/shortcut"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute pages.ecore#//Link/data"/>
- </genClasses>
- <genClasses ecoreClass="pages.ecore#//Page">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute pages.ecore#//Page/paramsVisible"/>
- </genClasses>
- <genClasses image="false" ecoreClass="pages.ecore#//PagesElement">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute pages.ecore#//PagesElement/name"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute pages.ecore#//PagesElement/location"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute pages.ecore#//PagesElement/size"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference pages.ecore#//PagesElement/children"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference pages.ecore#//PagesElement/parent"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference pages.ecore#//PagesElement/inputLinks"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference pages.ecore#//PagesElement/outputLinks"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute pages.ecore#//PagesElement/data"/>
- </genClasses>
- <genClasses ecoreClass="pages.ecore#//PagesModel"/>
- <genClasses ecoreClass="pages.ecore#//Param">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute pages.ecore#//Param/value"/>
- </genClasses>
- <genClasses ecoreClass="pages.ecore#//PgException"/>
- </genPackages>
-</genmodel:GenModel>
+<?xml version="1.0" encoding="UTF-8"?>
+<genmodel:GenModel xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/org.jboss.tools.seam.ui.pages/src"
+ modelPluginID="org.jboss.tools.seam.ui.pages" modelName="Pages" importerID="org.eclipse.emf.importer.java"
+ complianceLevel="5.0" copyrightFields="false">
+ <foreignModel>@model</foreignModel>
+ <genPackages prefix="Pages" basePackage="org.jboss.tools.seam.ui.pages.editor.ecore"
+ disposableProviderFactory="true" ecorePackage="pages.ecore#/">
+ <genDataTypes ecoreDataType="pages.ecore#//Point"/>
+ <genDataTypes ecoreDataType="pages.ecore#//Dimension"/>
+ <genClasses ecoreClass="pages.ecore#//Link">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute pages.ecore#//Link/name"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference pages.ecore#//Link/fromElement"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference pages.ecore#//Link/toElement"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute pages.ecore#//Link/shortcut"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute pages.ecore#//Link/data"/>
+ </genClasses>
+ <genClasses ecoreClass="pages.ecore#//Page">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute pages.ecore#//Page/paramsVisible"/>
+ </genClasses>
+ <genClasses image="false" ecoreClass="pages.ecore#//PagesElement">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute pages.ecore#//PagesElement/name"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute pages.ecore#//PagesElement/location"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute pages.ecore#//PagesElement/size"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference pages.ecore#//PagesElement/children"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference pages.ecore#//PagesElement/parent"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference pages.ecore#//PagesElement/inputLinks"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference pages.ecore#//PagesElement/outputLinks"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute pages.ecore#//PagesElement/data"/>
+ </genClasses>
+ <genClasses ecoreClass="pages.ecore#//PagesModel"/>
+ <genClasses ecoreClass="pages.ecore#//Param">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute pages.ecore#//Param/value"/>
+ </genClasses>
+ <genClasses ecoreClass="pages.ecore#//PageException"/>
+ </genPackages>
+</genmodel:GenModel>
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/ExceptionEditPart.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/ExceptionEditPart.java 2008-06-06 09:57:23 UTC (rev 8600)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/ExceptionEditPart.java 2008-06-06 10:00:24 UTC (rev 8601)
@@ -10,9 +10,8 @@
******************************************************************************/
package org.jboss.tools.seam.ui.pages.editor.edit;
-import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
-import java.util.*;
+import java.util.List;
import org.eclipse.draw2d.ConnectionAnchor;
import org.eclipse.draw2d.FigureUtilities;
@@ -23,24 +22,23 @@
import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.Notifier;
-import org.jboss.tools.common.model.ui.dnd.DnDUtil;
-import org.eclipse.gef.*;
+import org.eclipse.gef.AccessibleEditPart;
+import org.eclipse.gef.ConnectionEditPart;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPartListener;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gef.Request;
import org.eclipse.gef.requests.DropRequest;
import org.eclipse.swt.accessibility.AccessibleControlEvent;
import org.eclipse.swt.accessibility.AccessibleEvent;
-
-import org.jboss.tools.common.meta.action.XAction;
-import org.jboss.tools.common.model.XModelException;
-import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.seam.ui.pages.editor.ecore.pages.Link;
-import org.jboss.tools.seam.ui.pages.editor.ecore.pages.Page;
-import org.jboss.tools.seam.ui.pages.editor.ecore.pages.PgException;
+import org.jboss.tools.seam.ui.pages.editor.ecore.pages.PageException;
import org.jboss.tools.seam.ui.pages.editor.figures.ExceptionFigure;
import org.jboss.tools.seam.ui.pages.editor.figures.NodeFigure;
-import org.jboss.tools.seam.ui.pages.editor.figures.PageFigure;
public class ExceptionEditPart extends PagesEditPart implements PropertyChangeListener, EditPartListener, Adapter {
- private ExceptionFigure fig = null;
+ private NodeFigure fig = null;
private boolean single = true;
@@ -142,8 +140,8 @@
*
* @return Model of this as an LED.
*/
- public PgException getExceptionModel() {
- return (PgException) getModel();
+ public PageException getExceptionModel() {
+ return (PageException) getModel();
}
Dimension size;
@@ -154,10 +152,9 @@
Point loc = getExceptionModel().getLocation();
String text = getExceptionModel().getName();
if(text == null) text="Exception";
- int width = 30+FigureUtilities.getTextExtents(text, NodeFigure.exceptionFont).width;
- size = new Dimension(width, 21);
- loc.x -= loc.x % 8;
- loc.y -= loc.y % 8;
+ int width = getIconWidth()+FigureUtilities.getTextExtents(text, NodeFigure.exceptionFont).width;
+ size = new Dimension(width, getVisualHeight());
+ adjustForGrid(loc);
Rectangle r = new Rectangle(loc, size);
@@ -165,6 +162,16 @@
getFigure(), r);
}
+
+
+ private int getVisualHeight() {
+ return 21;
+ }
+
+ private int getIconWidth() {
+ return 30;
+ }
+
public ConnectionAnchor getTargetConnectionAnchor(
ConnectionEditPart connEditPart) {
ConnectionAnchor anc = getNodeFigure().getConnectionAnchor("1_IN");
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/GraphicalPartFactory.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/GraphicalPartFactory.java 2008-06-06 09:57:23 UTC (rev 8600)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/GraphicalPartFactory.java 2008-06-06 10:00:24 UTC (rev 8601)
@@ -16,7 +16,7 @@
import org.jboss.tools.seam.ui.pages.editor.ecore.pages.Page;
import org.jboss.tools.seam.ui.pages.editor.ecore.pages.PagesModel;
import org.jboss.tools.seam.ui.pages.editor.ecore.pages.Param;
-import org.jboss.tools.seam.ui.pages.editor.ecore.pages.PgException;
+import org.jboss.tools.seam.ui.pages.editor.ecore.pages.PageException;
public class GraphicalPartFactory implements EditPartFactory {
@@ -29,7 +29,7 @@
child = new PagesDiagramEditPart();
else if (model instanceof Page)
child = new PageEditPart();
- else if (model instanceof PgException)
+ else if (model instanceof PageException)
child = new ExceptionEditPart();
else if (model instanceof PageWrapper)
child = new ParamListEditPart();
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/PageEditPart.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/PageEditPart.java 2008-06-06 09:57:23 UTC (rev 8600)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/PageEditPart.java 2008-06-06 10:00:24 UTC (rev 8601)
@@ -166,8 +166,7 @@
height = 23 + NodeFigure.LINK_HEIGHT;
size = new Dimension(50, height);
- loc.x -= loc.x % 8;
- loc.y -= loc.y % 8;
+ adjustForGrid(loc);
Rectangle r = new Rectangle(loc, size);
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/PagesEditPart.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/PagesEditPart.java 2008-06-06 09:57:23 UTC (rev 8600)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/PagesEditPart.java 2008-06-06 10:00:24 UTC (rev 8601)
@@ -273,4 +273,14 @@
connection.setTarget(null);
primRemoveTargetConnection(connection);
}
+
+
+ /** Adjust the location to lock into a Grid
+ * TODO: I don't think the editPart should have to do this ?
+ **/
+ protected void adjustForGrid(Point loc) {
+ loc.x -= loc.x % 8;
+ loc.y -= loc.y % 8;
+ }
+
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/PagesXYLayoutEditPolicy.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/PagesXYLayoutEditPolicy.java 2008-06-06 09:57:23 UTC (rev 8600)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/PagesXYLayoutEditPolicy.java 2008-06-06 10:00:24 UTC (rev 8601)
@@ -32,7 +32,7 @@
import org.jboss.tools.seam.ui.pages.editor.commands.SetConstraintCommand;
import org.jboss.tools.seam.ui.pages.editor.ecore.pages.Page;
import org.jboss.tools.seam.ui.pages.editor.ecore.pages.PagesElement;
-import org.jboss.tools.seam.ui.pages.editor.ecore.pages.PgException;
+import org.jboss.tools.seam.ui.pages.editor.ecore.pages.PageException;
import org.jboss.tools.seam.ui.pages.editor.figures.ExceptionFeedbackFigure;
import org.jboss.tools.seam.ui.pages.editor.figures.NodeFigure;
import org.jboss.tools.seam.ui.pages.editor.figures.PageFeedbackFigure;
@@ -108,7 +108,7 @@
if (modelPart instanceof Page)
figure = new PageFeedbackFigure();
- else if (modelPart instanceof PgException)
+ else if (modelPart instanceof PageException)
figure = new ExceptionFeedbackFigure();
else {
figure = new RectangleFigure();
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/ParamEditPart.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/ParamEditPart.java 2008-06-06 09:57:23 UTC (rev 8600)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/ParamEditPart.java 2008-06-06 10:00:24 UTC (rev 8601)
@@ -34,7 +34,7 @@
import org.eclipse.swt.accessibility.AccessibleEvent;
import org.jboss.tools.seam.ui.pages.editor.ecore.pages.Link;
import org.jboss.tools.seam.ui.pages.editor.ecore.pages.Param;
-import org.jboss.tools.seam.ui.pages.editor.ecore.pages.PgException;
+import org.jboss.tools.seam.ui.pages.editor.ecore.pages.PageException;
import org.jboss.tools.seam.ui.pages.editor.figures.ExceptionFigure;
import org.jboss.tools.seam.ui.pages.editor.figures.NodeFigure;
import org.jboss.tools.seam.ui.pages.editor.figures.ParamFigure;
@@ -154,10 +154,9 @@
Point loc = getExceptionModel().getLocation();
String text = getExceptionModel().getName();
if(text == null) text="Exception";
- int width = 30+FigureUtilities.getTextExtents(text, NodeFigure.exceptionFont).width;
- size = new Dimension(width, 21);
- loc.x -= loc.x % 8;
- loc.y -= loc.y % 8;
+ int width = getIconWidth()+FigureUtilities.getTextExtents(text, NodeFigure.exceptionFont).width;
+ size = new Dimension(width, getVisualHeight());
+ adjustForGrid(loc);
Rectangle r = new Rectangle(loc, size);
@@ -165,6 +164,14 @@
getFigure(), r);
}
+ private int getVisualHeight() {
+ return 21;
+ }
+
+ private int getIconWidth() {
+ return 30;
+ }
+
public ConnectionAnchor getTargetConnectionAnchor(
ConnectionEditPart connEditPart) {
ConnectionAnchor anc = getNodeFigure().getConnectionAnchor("1_IN");
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/ParamListEditPart.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/ParamListEditPart.java 2008-06-06 09:57:23 UTC (rev 8600)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/ParamListEditPart.java 2008-06-06 10:00:24 UTC (rev 8601)
@@ -33,7 +33,7 @@
import org.eclipse.swt.accessibility.AccessibleControlEvent;
import org.eclipse.swt.accessibility.AccessibleEvent;
import org.jboss.tools.seam.ui.pages.editor.ecore.pages.Link;
-import org.jboss.tools.seam.ui.pages.editor.ecore.pages.PgException;
+import org.jboss.tools.seam.ui.pages.editor.ecore.pages.PageException;
import org.jboss.tools.seam.ui.pages.editor.figures.ExceptionFigure;
import org.jboss.tools.seam.ui.pages.editor.figures.NodeFigure;
import org.jboss.tools.seam.ui.pages.editor.figures.ParamListFigure;
@@ -144,8 +144,7 @@
protected void refreshVisuals() {
Point loc = new Point(1,1);
size = new Dimension(10, 10);
- loc.x -= loc.x % 8;
- loc.y -= loc.y % 8;
+ adjustForGrid(loc);
Rectangle r = new Rectangle(loc, size);
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/ExceptionFigure.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/ExceptionFigure.java 2008-06-06 09:57:23 UTC (rev 8600)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/ExceptionFigure.java 2008-06-06 10:00:24 UTC (rev 8601)
@@ -22,7 +22,7 @@
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Image;
import org.jboss.tools.common.gef.GEFGraphicalViewer;
-import org.jboss.tools.seam.ui.pages.editor.ecore.pages.PgException;
+import org.jboss.tools.seam.ui.pages.editor.ecore.pages.PageException;
import org.jboss.tools.seam.ui.pages.editor.edit.ExceptionEditPart;
import org.jboss.tools.seam.ui.pages.editor.figures.xpl.FixedConnectionAnchor;
import org.jboss.tools.seam.ui.pages.editor.print.PrintIconHelper;
@@ -32,7 +32,7 @@
private Image icon = null;
- public PgException exc;
+ public PageException exc;
ExceptionEditPart editPart;
@@ -48,42 +48,7 @@
icon = PrintIconHelper.getPrintImage(i);
}
- public void init(int number) {
- FixedConnectionAnchor c;
- if (number == 0)
- number = 1;
- for (int i = 0; i < number; i++) {
- c = new FixedConnectionAnchor(this);
- c.offsetV = 32 + LINK_HEIGHT * i;
- c.leftToRight = false;
- connectionAnchors.put((i + 1) + "_OUT", c);
- outputConnectionAnchors.addElement(c);
- }
- }
-
- public void addConnectionAnchor(int number) {
- FixedConnectionAnchor c;
- if (number == 1)
- return;
- c = new FixedConnectionAnchor(this);
- c.offsetV = 32 + LINK_HEIGHT * (number - 1);
- // c.offsetH = -1;
- c.leftToRight = false;
- connectionAnchors.put(number + "_OUT", c);
- outputConnectionAnchors.addElement(c);
- }
-
- public void removeConnectionAnchor() {
- if (outputConnectionAnchors.size() == 1)
- return;
- outputConnectionAnchors.remove(outputConnectionAnchors.size() - 1);
- }
-
- public void removeAllConnectionAnchor() {
- outputConnectionAnchors.removeAllElements();
- }
-
- public ExceptionFigure(PgException group) {
+ public ExceptionFigure(PageException group) {
this.exc = group;
if (group != null) {
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/FigureFactory.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/FigureFactory.java 2008-06-06 09:57:23 UTC (rev 8600)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/FigureFactory.java 2008-06-06 10:00:24 UTC (rev 8601)
@@ -56,6 +56,13 @@
conn.setConnectionRouter(new PagesConnectionRouter());
conn.setForegroundColor(selectedColor);
+ PolygonDecoration decor = new PolygonDecoration();
+ decor.setBackgroundColor(NodeFigure.whiteColor);
+ decor.setTemplate(TRIANGLE_TIP);
+ decor.setScale(1, 1);
+
+ conn.setTargetDecoration(decor);
+
return conn;
}
}
\ No newline at end of file
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/NodeFigure.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/NodeFigure.java 2008-06-06 09:57:23 UTC (rev 8600)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/NodeFigure.java 2008-06-06 10:00:24 UTC (rev 8601)
@@ -17,6 +17,7 @@
import org.eclipse.swt.graphics.Image;
import org.jboss.tools.common.gef.figures.xpl.BaseNodeFigure;
import org.jboss.tools.common.model.ui.ModelUIImages;
+import org.jboss.tools.seam.ui.pages.editor.figures.xpl.FixedConnectionAnchor;
public class NodeFigure extends
BaseNodeFigure {
@@ -91,4 +92,31 @@
}
return text;
}
+
+ final public void initConnectionAnchors(int numberOfAnchors) {
+ if (numberOfAnchors == 0)
+ numberOfAnchors = 1;
+ for (int i = 0; i < numberOfAnchors; i++) {
+ addConnectionAnchor(i);
+ }
+ }
+
+ final public void addConnectionAnchor(int index) {
+ FixedConnectionAnchor c;
+ c = new FixedConnectionAnchor(this);
+ c.offsetV = 32 + LINK_HEIGHT * index;
+ c.leftToRight = false;
+ connectionAnchors.put((index + 1) + "_OUT", c);
+ outputConnectionAnchors.addElement(c);
+ }
+
+ final public void removeConnectionAnchor() {
+ if (outputConnectionAnchors.size() == 1)
+ return;
+ outputConnectionAnchors.remove(outputConnectionAnchors.size() - 1);
+ }
+
+ final public void removeAllConnectionAnchor() {
+ outputConnectionAnchors.removeAllElements();
+ }
}
\ No newline at end of file
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/PageFigure.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/PageFigure.java 2008-06-06 09:57:23 UTC (rev 8600)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/PageFigure.java 2008-06-06 10:00:24 UTC (rev 8601)
@@ -102,48 +102,14 @@
label.setLocation(new Point(getLocation().x - 5,
getLocation().y - 20));
}
-
- public void init(int number) {
- FixedConnectionAnchor c;
- if (number == 0)
- number = 1;
- for (int i = 0; i < number; i++) {
- c = new FixedConnectionAnchor(this);
- c.offsetV = 32 + LINK_HEIGHT * i;
- c.leftToRight = false;
- connectionAnchors.put((i + 1) + "_OUT", c);
- outputConnectionAnchors.addElement(c);
- }
- }
-
- public void addConnectionAnchor(int number) {
- FixedConnectionAnchor c;
- //if (number == 1)
- //return;
- c = new FixedConnectionAnchor(this);
- c.offsetV = 32 + LINK_HEIGHT * number;
- c.leftToRight = false;
- connectionAnchors.put((number + 1) + "_OUT", c);
- outputConnectionAnchors.addElement(c);
- }
-
- public void removeConnectionAnchor() {
- if (outputConnectionAnchors.size() == 1)
- return;
- outputConnectionAnchors.remove(outputConnectionAnchors.size() - 1);
- }
-
- public void removeAllConnectionAnchor() {
- outputConnectionAnchors.removeAllElements();
- }
-
+
public PageFigure(Page group) {
this.page = group;
if (group != null) {
setIcon(group.getImage());
setPath(group.getName());
- init(group.getOutputLinks().size());
+ initConnectionAnchors(group.getOutputLinks().size());
}
setOpaque(false);
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/ParamFigure.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/ParamFigure.java 2008-06-06 09:57:23 UTC (rev 8600)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/ParamFigure.java 2008-06-06 10:00:24 UTC (rev 8601)
@@ -47,42 +47,6 @@
//icon = PrintIconHelper.getPrintImage(i);
}
-
- public void init(int number) {
- FixedConnectionAnchor c;
- if (number == 0)
- number = 1;
- for (int i = 0; i < number; i++) {
- c = new FixedConnectionAnchor(this);
- c.offsetV = 32 + LINK_HEIGHT * i;
- c.leftToRight = false;
- connectionAnchors.put((i + 1) + "_OUT", c);
- outputConnectionAnchors.addElement(c);
- }
- }
-
- public void addConnectionAnchor(int number) {
- FixedConnectionAnchor c;
- if (number == 1)
- return;
- c = new FixedConnectionAnchor(this);
- c.offsetV = 32 + LINK_HEIGHT * (number - 1);
- // c.offsetH = -1;
- c.leftToRight = false;
- connectionAnchors.put(number + "_OUT", c);
- outputConnectionAnchors.addElement(c);
- }
-
- public void removeConnectionAnchor() {
- if (outputConnectionAnchors.size() == 1)
- return;
- outputConnectionAnchors.remove(outputConnectionAnchors.size() - 1);
- }
-
- public void removeAllConnectionAnchor() {
- outputConnectionAnchors.removeAllElements();
- }
-
public ParamFigure(Param group) {
this.exc = group;
15 years, 11 months
JBoss Tools SVN: r8599 - in trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core: utils and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: Grid.Qian
Date: 2008-06-06 05:48:28 -0400 (Fri, 06 Jun 2008)
New Revision: 8599
Modified:
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/classpath/JbossWSRuntimeClassPathInitializer.java
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/utils/JbossWSCoreUtils.java
Log:
JBIDE-2261: support multi runtimes
Modified: trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/classpath/JbossWSRuntimeClassPathInitializer.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/classpath/JbossWSRuntimeClassPathInitializer.java 2008-06-06 09:13:45 UTC (rev 8598)
+++ trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/classpath/JbossWSRuntimeClassPathInitializer.java 2008-06-06 09:48:28 UTC (rev 8599)
@@ -22,6 +22,7 @@
public JbossWSRuntimeClassPathInitializer() {
}
+ private String segment;
@Override
public void initialize(IPath containerPath, IJavaProject project)
@@ -34,6 +35,7 @@
JavaCore.setClasspathContainer(containerPath,
new IJavaProject[] { project },
new IClasspathContainer[] { container }, null);
+ segment = containerPath.segment(1);
}
}
@@ -65,7 +67,7 @@
public IClasspathEntry[] getClasspathEntries() {
if (entries == null) {
ArrayList<IClasspathEntry> list = new ArrayList<IClasspathEntry>();
- IPath wsPath = JbossWSCoreUtils.getJbossWSRuntimePath(null);
+ IPath wsPath = JbossWSCoreUtils.getJbossWSRuntimePath(segment);
if (wsPath != null) {
IPath libPath = wsPath.append(JbossWSCoreMessages.Dir_Lib);
list.addAll(Arrays.asList(getEntries(libPath)));
Modified: trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/utils/JbossWSCoreUtils.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/utils/JbossWSCoreUtils.java 2008-06-06 09:13:45 UTC (rev 8598)
+++ trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/utils/JbossWSCoreUtils.java 2008-06-06 09:48:28 UTC (rev 8599)
@@ -36,6 +36,7 @@
import org.jboss.tools.ws.core.JbossWSCorePlugin;
import org.jboss.tools.ws.core.classpath.JbossWSRuntime;
import org.jboss.tools.ws.core.classpath.JbossWSRuntimeListConverter;
+import org.jboss.tools.ws.core.classpath.JbossWSRuntimeManager;
import org.jboss.tools.ws.core.messages.JbossWSCoreMessages;
/**
@@ -220,32 +221,26 @@
}
public static IPath getJbossWSRuntimePath(String runtimeName) {
- Map<String, JbossWSRuntime> runtimes = getJbossWSRutntimeMap();
+ JbossWSRuntime[] runtimes = JbossWSRuntimeManager.getInstance().getRuntimes();
+ if(runtimes == null || runtimes.length == 0){
+ return null;
+ }
if (runtimeName == null || runtimeName.equals("")) {
- for (JbossWSRuntime rt : runtimes.values()) {
+ for (JbossWSRuntime rt : runtimes) {
if (rt.isDefault()) {
return new Path(rt.getHomeDir());
}
}
return null;
+ } else {
+ for (JbossWSRuntime rt : runtimes) {
+ if(rt.getName().equals(runtimeName)){
+ return new Path(rt.getHomeDir());
+ }
+ }
}
- if (runtimes.get(runtimeName) != null) {
- return new Path(runtimes.get(runtimeName).getHomeDir());
- }
return null;
}
- public static Map<String, JbossWSRuntime> getJbossWSRutntimeMap(){
- IPreferenceStore ps = JbossWSCorePlugin.getDefault()
- .getPreferenceStore();
- String runtimeLocation = ps.getString(JbossWSCoreMessages.WS_Location);
- if (runtimeLocation == null || runtimeLocation.equals("")) {
- return new HashMap<String, JbossWSRuntime>();
- }
- Map<String, JbossWSRuntime> runtimes = new HashMap<String, JbossWSRuntime>();
- JbossWSRuntimeListConverter converter = new JbossWSRuntimeListConverter();
- runtimes = converter.getMap(runtimeLocation);
- return runtimes;
- }
}
15 years, 11 months
JBoss Tools SVN: r8598 - trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences.
by jbosstools-commits@lists.jboss.org
Author: Grid.Qian
Date: 2008-06-06 05:13:45 -0400 (Fri, 06 Jun 2008)
New Revision: 8598
Modified:
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences/JbossRuntimeListFieldEditor.java
Log:
JBIDE-2047: modify for I18n messages
Modified: trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences/JbossRuntimeListFieldEditor.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences/JbossRuntimeListFieldEditor.java 2008-06-06 09:12:58 UTC (rev 8597)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences/JbossRuntimeListFieldEditor.java 2008-06-06 09:13:45 UTC (rev 8598)
@@ -506,7 +506,7 @@
}
if (!runtimeExist(homeDir.getValueAsString())) {
- setErrorMessage(JbossWSUIMessages.Label_JBOSSWS_Runtime_Load_Error);
+ setErrorMessage(JbossWSUIMessages.Label_JBossWS_Runtime_Load_Error);
setPageComplete(false);
return;
}
@@ -577,7 +577,7 @@
if (!jbosswsHomeDir.isDirectory())
return false;
String[] newNode = { JbossWSUIMessages.Bin,
- JbossWSUIMessages.Commond };
+ JbossWSUIMessages.Command };
String jbosswsBinPath = UIUtils.addNodesToPath(jbosswsHomeDir
.getAbsolutePath(), newNode);
if (new File(jbosswsBinPath).isFile()) {
15 years, 11 months
JBoss Tools SVN: r8597 - trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages.
by jbosstools-commits@lists.jboss.org
Author: Grid.Qian
Date: 2008-06-06 05:12:58 -0400 (Fri, 06 Jun 2008)
New Revision: 8597
Modified:
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JbossWSUI.properties
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JbossWSUIMessages.java
Log:
JBIDE-2047: modify for I18n messages
Modified: trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JbossWSUI.properties
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JbossWSUI.properties 2008-06-06 09:00:11 UTC (rev 8596)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JbossWSUI.properties 2008-06-06 09:12:58 UTC (rev 8597)
@@ -1,7 +1,7 @@
-LABEL_JBOSSWS_RUNTIME_LOAD_ERROR=Error occurred while loading JBossWS runtime. Select the correct JBossWS runtime folder.
+Label_JBossWS_Runtime_Load_Error=Error occurred while loading JBossWS runtime. Select the correct JBossWS runtime folder.
-COMMOND=wsconsume.sh
-BIN=bin
+Command=wsconsume.sh
+Bin=bin
Error_JBossWS_Basic_Editor_Composite=Parent control should be Composite
Error_JBossWS_Basic_Editor_Support=Editor supports only grid layout
Modified: trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JbossWSUIMessages.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JbossWSUIMessages.java 2008-06-06 09:00:11 UTC (rev 8596)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JbossWSUIMessages.java 2008-06-06 09:12:58 UTC (rev 8597)
@@ -25,10 +25,10 @@
// Do not instantiate
}
- public static String Label_JBOSSWS_Runtime_Load_Error;
+ public static String Label_JBossWS_Runtime_Load_Error;
public static String Bin;
- public static String Commond;
+ public static String Command;
public static String Error_JBossWS_Basic_Editor_Composite;
public static String Error_JBossWS_Basic_Editor_Support;
15 years, 11 months
JBoss Tools SVN: r8596 - trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/model/handlers.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-06-06 05:00:11 -0400 (Fri, 06 Jun 2008)
New Revision: 8596
Modified:
trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/model/handlers/AddViewSupport.java
Log:
JBIDE-2305
Modified: trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/model/handlers/AddViewSupport.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/model/handlers/AddViewSupport.java 2008-06-06 08:55:43 UTC (rev 8595)
+++ trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/model/handlers/AddViewSupport.java 2008-06-06 09:00:11 UTC (rev 8596)
@@ -82,13 +82,14 @@
return template.trim().substring(i);
}
}
- return getExtension();
+ //Let user specify extension
+ return ""; //getExtension();
}
public static String getExtension() {
XModelObject addView = getPreferenceObject();
String v = (addView == null) ? "" : addView.getAttributeValue("Extension");
- if(v == null || v.length() == 0) return ".jsp";
+ if(v == null || v.length() == 0) return ".xhtml";
if(!v.startsWith(".")) v = "." + v;
return v;
}
@@ -215,28 +216,33 @@
return path;
}
- static boolean hasWildCard(String path) {
- return path.indexOf('*') >= 0 || path.indexOf("#{") >= 0;
- }
-
String revalidatePath(String path, String template) {
if(path != null) path = path.trim();
if(path == null || path.length() == 0) return path;
if(!path.startsWith("/") && !path.startsWith("*")) path = "/" + path;
if(hasWildCard(path)) return path;
if(path.indexOf('.') < 0 && !path.endsWith("/")) {
- path += getExtension(template);
+ path += template == null ? "" : getExtension(template);
}
return path;
}
+ static boolean hasWildCard(String path) {
+ return path.indexOf('*') >= 0 || path.indexOf("#{") >= 0;
+ }
+
public boolean canCreateFile(String path) {
XModelObject fs = getTarget().getModel().getByPath("FileSystems/WEB-ROOT");
if(fs == null) return false;
path = revalidatePath(path, getAttributeValue(0, "template"));
if(path == null || path.length() == 0
|| hasWildCard(path)) return false;
- return isCorrectPath(path) && !fileExists(path);
+ //extension must be available
+ int m = path.lastIndexOf('.');
+ if(m < 0 || m >= path.length() - 1) return false;
+
+ return isCorrectPath(path) && !fileExists(path)
+ && path.lastIndexOf('.') < path.length() - 1;
}
static String FORBIDDEN_INDICES = "\"\n\t\\:<>?|"; //* is allowed anywhere
15 years, 11 months
JBoss Tools SVN: r8595 - in trunk/ws/plugins: org.jboss.tools.ws.core/META-INF and 10 other directories.
by jbosstools-commits@lists.jboss.org
Author: dennyxu
Date: 2008-06-06 04:55:43 -0400 (Fri, 06 Jun 2008)
New Revision: 8595
Added:
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/facet/delegate/IJBossWSFacetDataModelProperties.java
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/facet/delegate/JBossWSFacetInstallDataModelProvider.java
trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/project/
trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/project/facet/
trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/project/facet/JBossWSFacetInstallPage.java
Modified:
trunk/ws/plugins/org.jboss.tools.ws.core/META-INF/MANIFEST.MF
trunk/ws/plugins/org.jboss.tools.ws.core/plugin.xml
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/command/JbossWSClassPathCommand.java
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/facet/delegate/JbossWSInstallRuntimeDelegate.java
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/messages/JbossWSCore.properties
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/messages/JbossWSCoreMessages.java
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/ImplementationClassCreationCommand.java
trunk/ws/plugins/org.jboss.tools.ws.creation.ui/META-INF/MANIFEST.MF
trunk/ws/plugins/org.jboss.tools.ws.creation.ui/plugin.xml
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences/JbossRuntimeListFieldEditor.java
Log:
JBIDE-2262:add jbossws facet install page to let users select a ws runtime
Modified: trunk/ws/plugins/org.jboss.tools.ws.core/META-INF/MANIFEST.MF
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.core/META-INF/MANIFEST.MF 2008-06-06 08:52:30 UTC (rev 8594)
+++ trunk/ws/plugins/org.jboss.tools.ws.core/META-INF/MANIFEST.MF 2008-06-06 08:55:43 UTC (rev 8595)
@@ -12,6 +12,13 @@
org.eclipse.core.resources,
org.eclipse.jst.ws,
org.eclipse.jdt.core,
+ org.eclipse.jdt.launching,
+ org.eclipse.jst.jsf.core,
+ org.eclipse.jst.jsf.ui,
+ org.eclipse.wst.common.modulecore,
+ org.eclipse.jdt.launching,
+ org.eclipse.jst.jsf.core,
+ org.eclipse.jst.jsf.ui,
org.eclipse.jdt.launching
Eclipse-LazyStart: true
Bundle-Vendor: %PLUGIN_PROVIDER
Modified: trunk/ws/plugins/org.jboss.tools.ws.core/plugin.xml
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.core/plugin.xml 2008-06-06 08:52:30 UTC (rev 8594)
+++ trunk/ws/plugins/org.jboss.tools.ws.core/plugin.xml 2008-06-06 08:55:43 UTC (rev 8595)
@@ -16,8 +16,14 @@
<constraint>
<requires facet="jst.web" version="2.2,2.3,2.4,2.5"/>
</constraint>
- <action type="INSTALL">
+ <action
+ facet="jbossws.core"
+ id="jbossws.core.install"
+ type="INSTALL">
<delegate class="org.jboss.tools.ws.core.facet.delegate.JbossWSInstallRuntimeDelegate"/>
+ <config-factory
+ class="org.jboss.tools.ws.core.facet.delegate.JBossWSFacetInstallDataModelProvider">
+ </config-factory>
</action>
<!--
<action type="UNINSTALL">
@@ -63,5 +69,6 @@
id="JbossWSRuntimeLib">
</classpathContainerInitializer>
</extension>
+
</plugin>
Modified: trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/command/JbossWSClassPathCommand.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/command/JbossWSClassPathCommand.java 2008-06-06 08:52:30 UTC (rev 8594)
+++ trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/command/JbossWSClassPathCommand.java 2008-06-06 08:55:43 UTC (rev 8595)
@@ -13,11 +13,13 @@
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.QualifiedName;
import org.eclipse.core.runtime.Status;
import org.eclipse.jdt.core.IClasspathEntry;
import org.eclipse.jdt.core.IJavaProject;
@@ -25,6 +27,8 @@
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.osgi.util.NLS;
import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
+import org.jboss.tools.ws.core.facet.delegate.IJBossWSFacetDataModelProperties;
import org.jboss.tools.ws.core.messages.JbossWSCoreMessages;
import org.jboss.tools.ws.core.utils.StatusUtils;
@@ -35,9 +39,11 @@
IProject project;
String runtimeLocation;
+ private IDataModel model;
- public JbossWSClassPathCommand(IProject project) {
+ public JbossWSClassPathCommand(IProject project, IDataModel model) {
this.project = project;
+ this.model = model;
}
public IStatus execute(IProgressMonitor monitor, IAdaptable info)
@@ -47,7 +53,17 @@
public IStatus executeOverride(IProgressMonitor monitor) {
IStatus status = Status.OK_STATUS;
- status = addClassPath(project);
+ try{
+ boolean isServerSupplied = model.getBooleanProperty(IJBossWSFacetDataModelProperties.JBOSS_WS_RUNTIME_IS_SERVER_SUPPLIED);
+ if(isServerSupplied){
+ QualifiedName serverSupplied_qn = new QualifiedName(IJBossWSFacetDataModelProperties.QUALIFIEDNAME_IDENTIFIER_IS_SERVER_SUPPLIED, IJBossWSFacetDataModelProperties.PERSISTENT_PROPERTY_IS_SERVER_SUPPLIED_RUNTIME);
+ project.setPersistentProperty(serverSupplied_qn, "1");
+ }
+ status = addClassPath(project);
+ }catch(CoreException e){
+ status = StatusUtils.errorStatus(
+ JbossWSCoreMessages.ERROR_ADD_FACET_JBOSSWS, e);
+ }
return status;
}
Added: trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/facet/delegate/IJBossWSFacetDataModelProperties.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/facet/delegate/IJBossWSFacetDataModelProperties.java (rev 0)
+++ trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/facet/delegate/IJBossWSFacetDataModelProperties.java 2008-06-06 08:55:43 UTC (rev 8595)
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.ws.core.facet.delegate;
+
+import org.eclipse.wst.common.project.facet.core.IActionConfigFactory;
+
+/**
+ * Seam facet properties collected in Seam Web Project Wizard.
+ * Only properties listed below are saved in Seam WebProject Preferences:
+ * ISeamFacetDataModelProperties.SESSION_BEAN_SOURCE_FOLDER,
+ * ISeamFacetDataModelProperties.SESION_BEAN_PACKAGE_NAME,
+ * ISeamFacetDataModelProperties.ENTITY_BEAN_SOURCE_FOLDER,
+ * ISeamFacetDataModelProperties.ENTITY_BEAN_PACKAGE_NAME,
+ * ISeamFacetDataModelProperties.SEAM_CONNECTION_PROFILE,
+ * ISeamFacetDataModelProperties.JBOSS_AS_DEPLOY_AS,
+ * ISeamFacetDataModelProperties.SEAM_TEST_PROJECT,
+ * ISeamFacetDataModelProperties.SEAM_RUNTIME_NAME,
+ * ISeamFacetDataModelProperties.SEAM_SETTINGS_VERSION,
+ * ISeamFacetDataModelProperties.TEST_SOURCE_FOLDER,
+ * ISeamFacetDataModelProperties.TEST_CASES_PACKAGE_NAME,
+ * ISeamFacetDataModelProperties.TEST_CREATING,
+ * ISeamFacetDataModelProperties.SEAM_EJB_PROJECT,
+ * ISeamFacetDataModelProperties.SEAM_EAR_PROJECT
+ * @author eskimo
+ */
+public interface IJBossWSFacetDataModelProperties extends IActionConfigFactory {
+
+ // Seam Preferences names constants
+
+ String JBOSS_WS_FACET_ID = "jbossws.core";
+ String JBOSS_WS_RUNTIME_IS_SERVER_SUPPLIED = "jboss.ws.is.server.supplied";
+ String JBOSS_WS_RUNTIME_ID = "jboss.ws.runtime_id";
+ String JBOSS_WS_DEPLOY = "jboss.ws.deploy";
+ String JBOSS_WS_RUNTIME_HOME = "jboss.ws.runtime.home";
+ String QUALIFIEDNAME_IDENTIFIER_IS_SERVER_SUPPLIED = "jboss.tools.jbossws";
+ String PERSISTENT_PROPERTY_IS_SERVER_SUPPLIED_RUNTIME = "is.server.supplied.runtime";
+
+
+}
\ No newline at end of file
Added: trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/facet/delegate/JBossWSFacetInstallDataModelProvider.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/facet/delegate/JBossWSFacetInstallDataModelProvider.java (rev 0)
+++ trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/facet/delegate/JBossWSFacetInstallDataModelProvider.java 2008-06-06 08:55:43 UTC (rev 8595)
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.ws.core.facet.delegate;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Set;
+
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.wst.common.componentcore.datamodel.FacetInstallDataModelProvider;
+
+/**
+ * Data model provider for Seam facet wizard page
+ *
+ * @author eskimo
+ *
+ */
+public class JBossWSFacetInstallDataModelProvider extends
+ FacetInstallDataModelProvider implements IJBossWSFacetDataModelProperties {
+
+ private static final String EMPTY_STRING = "";
+
+ /**
+ * Returns set of facet properties for facet wizard page
+ *
+ * @return set of property names
+ */
+ public Set getPropertyNames() {
+ Set<String> names = super.getPropertyNames();
+
+ names.add(JBOSS_WS_DEPLOY);
+ names.add(JBOSS_WS_RUNTIME_ID);
+ names.add(JBOSS_WS_RUNTIME_IS_SERVER_SUPPLIED);
+ names.add(JBOSS_WS_RUNTIME_HOME);
+
+
+ return names;
+ }
+
+ /**
+ * Returns default value for a given property
+ *
+ * @param propertyName name of property which default value requested
+ * @return default value
+ */
+ public Object getDefaultProperty(String propertyName) {
+ if(propertyName.equals(JBOSS_WS_DEPLOY)){
+ return false;
+ }else if(propertyName.equals(JBOSS_WS_RUNTIME_ID)){
+ return "";
+ }else if(propertyName.equals(FACET_ID)){
+ return IJBossWSFacetDataModelProperties.JBOSS_WS_FACET_ID;
+ }
+ return super.getDefaultProperty(propertyName);
+ }
+
+
+}
Modified: trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/facet/delegate/JbossWSInstallRuntimeDelegate.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/facet/delegate/JbossWSInstallRuntimeDelegate.java 2008-06-06 08:52:30 UTC (rev 8594)
+++ trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/facet/delegate/JbossWSInstallRuntimeDelegate.java 2008-06-06 08:55:43 UTC (rev 8595)
@@ -14,6 +14,7 @@
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
import org.eclipse.wst.common.project.facet.core.IDelegate;
import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
import org.jboss.tools.ws.core.command.JbossWSClassPathCommand;
@@ -28,7 +29,10 @@
IProgressMonitor monitor) throws CoreException {
monitor.beginTask(JbossWSCoreMessages.Progress_Install_JBossWS_Runtime, 2 );
- JbossWSClassPathCommand command = new JbossWSClassPathCommand(project);
+ IDataModel model = (IDataModel)arg2;
+
+
+ JbossWSClassPathCommand command = new JbossWSClassPathCommand(project, model);
command.executeOverride(monitor);
monitor.worked( 1 );
monitor.done();
Modified: trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/messages/JbossWSCore.properties
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/messages/JbossWSCore.properties 2008-06-06 08:52:30 UTC (rev 8594)
+++ trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/messages/JbossWSCore.properties 2008-06-06 08:55:43 UTC (rev 8595)
@@ -1,3 +1,16 @@
+PROGRESS_INSTALL_JBOSSWS_RUNTIME=JBoss Web Service Runtime
+DIR_LIB=lib
+DIR_CLIENT=client
+DIR_WEB_INF=WEB-INF
+DIR_WEB_CONTENT=WebContent
+ERROR_COPY=Exception while copy JBossWS jars
+WS_LOCATION=jbosswsruntimelocation
+JBOSSWS_RUNTIME_LIB=JbossWSRuntimeLib
+JBOSSWS_RUNTIME=JBoss WS Runtime
+JBOSSAS=JBOSS
+ERROR_WS_LOCATION=The JBoss WS Runtime Location is NULL
+ERROR_WS_CLASSPATH=A error comes up when create JBoss WS Classpath
+ERROR_ADD_FACET_JBOSSWS=Exception while install JBossWS facet=======
Progress_Install_JBossWS_Runtime=JBoss Web Service Runtime
Dir_Lib=lib
Dir_Client=client
@@ -9,4 +22,4 @@
JBossWS_Runtime=JBoss WS Runtime
JBossAS=JBOSS
Error_WS_Location=The JBoss WS Runtime Location is NULL
-Error_WS_Classpath=A error comes up when create JBoss WS Classpath
\ No newline at end of file
+Error_WS_Classpath=A error comes up when create JBoss WS Classpath>>>>>>> .r8593
Modified: trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/messages/JbossWSCoreMessages.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/messages/JbossWSCoreMessages.java 2008-06-06 08:52:30 UTC (rev 8594)
+++ trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/messages/JbossWSCoreMessages.java 2008-06-06 08:55:43 UTC (rev 8595)
@@ -36,6 +36,7 @@
public static String JBossAS;
public static String Error_WS_Location;
public static String Error_WS_Classpath;
+ public static String ERROR_ADD_FACET_JBOSSWS;
static {
Modified: trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/ImplementationClassCreationCommand.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/ImplementationClassCreationCommand.java 2008-06-06 08:52:30 UTC (rev 8594)
+++ trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/ImplementationClassCreationCommand.java 2008-06-06 08:55:43 UTC (rev 8595)
@@ -30,13 +30,16 @@
import org.eclipse.jdt.core.dom.Block;
import org.eclipse.jdt.core.dom.BooleanLiteral;
import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jdt.core.dom.ExpressionStatement;
import org.eclipse.jdt.core.dom.FieldDeclaration;
import org.eclipse.jdt.core.dom.ImportDeclaration;
+import org.eclipse.jdt.core.dom.InfixExpression;
import org.eclipse.jdt.core.dom.Initializer;
import org.eclipse.jdt.core.dom.MemberValuePair;
import org.eclipse.jdt.core.dom.MethodDeclaration;
import org.eclipse.jdt.core.dom.MethodInvocation;
import org.eclipse.jdt.core.dom.Modifier;
+import org.eclipse.jdt.core.dom.Name;
import org.eclipse.jdt.core.dom.NormalAnnotation;
import org.eclipse.jdt.core.dom.NumberLiteral;
import org.eclipse.jdt.core.dom.PackageDeclaration;
@@ -67,7 +70,6 @@
private static final String RESOURCE_FOLDER = "src";
private static final String PREFIX_JAXWS_ANNOTATION_CLASS = "javax.jws";
- private static final String CLASS_LOGGER = "Logger";
private static final String SUFFIX_PACKAGENAME_IMPL = "impl";
private static final String DEFAULT_CU_SUFFIX = ".java";
@@ -77,10 +79,11 @@
private static final String ANNOTATION_PROPERTY_SERVICE_NAME = "serviceName";
private static final String ANNOTATION_PROPERTY_ENDPOINT_INTERFACE = "endpointInterface";
- private static final String LOGGER_VARIABLE_NAME = "log";
+ private static final String LOGGER_FIELD_NAME = "log";
private static final String LOGGER_CLASS_FULLNAME = "org.jboss.logging.Logger";
private static final String LOGGER_CLASS_NAME = "Logger";
- private static final String LOGGER_METHOD_GETLOGGER = "getLogger";
+ private static final String LOGGER_METHOD_NAME_GETLOGGER = "getLogger";
+ private static final String LOGGER_METHOD_NAME_INFO = "info";
private ServiceModel model;
private IWorkspaceRoot fWorkspaceRoot;
@@ -178,7 +181,7 @@
ast.newSimpleType(ast.newName(portTypeName)));
// add Logger variable declaration
- // createLoggerField(ast, type);
+ //createLoggerField(ast, type, portTypeName);
// add method implementation
TypeDeclaration inTD = (TypeDeclaration) portTypeCU.types().get(0);
@@ -317,46 +320,7 @@
return member;
}
- protected FieldDeclaration createLoggerField(AST ast, TypeDeclaration type, String portTypeName) {
- VariableDeclarationFragment vdf = ast.newVariableDeclarationFragment();
- vdf.setName(ast.newSimpleName(LOGGER_VARIABLE_NAME));
- Initializer clsAccesss = ast.newInitializer();
- FieldDeclaration fd = ast.newFieldDeclaration(vdf);
- fd.modifiers().add(Modifier.ModifierKeyword.PRIVATE_KEYWORD);
- fd.modifiers().add(Modifier.ModifierKeyword.STATIC_KEYWORD);
- fd.setType(ast.newSimpleType(ast.newSimpleName(LOGGER_CLASS_NAME)));
- MethodInvocation mi = ast.newMethodInvocation();
- mi.setExpression(ast.newSimpleName(LOGGER_CLASS_NAME));
- mi.setName(ast.newSimpleName(LOGGER_METHOD_GETLOGGER));
- String implClsName = getImplPackageName() + "." + getImplClassName(portTypeName);
- StringLiteral sl = ast.newStringLiteral();
- sl.setLiteralValue(implClsName);
- mi.arguments().add(sl);
- vdf.setInitializer(mi);
- type.bodyDeclarations().add(fd);
-
- /*
- * SingleVariableDeclaration svd = ast.newSingleVariableDeclaration();
- * svd.modifiers().add(ast.newModifier(Modifier.ModifierKeyword.PRIVATE_KEYWORD));
- * svd.modifiers().add(ast.newModifier(Modifier.ModifierKeyword.STATIC_KEYWORD));
- * svd.setType(ast.newSimpleType(ast.newSimpleName(CLASS_LOGGER)));
- * svd.setName(ast.newSimpleName("log")); Initializer initializer =
- * ast.newInitializer(); Block initBlock = ast.newBlock();
- *
- * MethodInvocation mi = ast.newMethodInvocation();
- * mi.setExpression(ast.newName("Logger"));
- * mi.setName(ast.newSimpleName("getLogger"));
- *
- *
- * MethodInvocation invokCls = ast.newMethodInvocation();
- * invokCls.setExpression((ast.newSimpleName("TestImpl"));
- * invokCls.setName(ast.newSimpleName("class"));
- * mi.arguments().add(invokCls.getExpression();
- * svd.setInitializer(ast.newExpressionStatement(mi).getExpression());
- */
- return null;
- }
-
+
protected MethodDeclaration createMethodForImplClass(AST ast,
MethodDeclaration inMethod) {
@@ -384,6 +348,9 @@
// create method body
Block block = ast.newBlock();
+ // add log info statement
+ //block.statements().add(createLoggerInvokeStatement(ast, md.getName().getFullyQualifiedName()));
+
Type returnType = inMethod.getReturnType2();
ReturnStatement rs = ast.newReturnStatement();
@@ -406,9 +373,13 @@
StringLiteral sl = ast.newStringLiteral();
sl.setLiteralValue("");
rs.setExpression(sl);
- } else if(!"void".equals(typeName)){
+ } else if("void".equals(typeName)){
+ // do nothing
+ }else{
rs.setExpression(ast.newNullLiteral());
}
+
+
} else {
rs.setExpression(ast.newNullLiteral());
}
@@ -420,6 +391,41 @@
return md;
}
+/* protected FieldDeclaration createLoggerField(AST ast, TypeDeclaration type, String portTypeName) {
+ VariableDeclarationFragment vdf = ast.newVariableDeclarationFragment();
+ vdf.setName(ast.newSimpleName(LOGGER_FIELD_NAME));
+ Initializer clsAccesss = ast.newInitializer();
+ FieldDeclaration fd = ast.newFieldDeclaration(vdf);
+ fd.modifiers().add(ast.newModifier(Modifier.ModifierKeyword.PRIVATE_KEYWORD));
+ fd.modifiers().add(ast.newModifier(Modifier.ModifierKeyword.STATIC_KEYWORD));
+ fd.setType(ast.newSimpleType(ast.newSimpleName(LOGGER_CLASS_NAME)));
+ MethodInvocation mi = ast.newMethodInvocation();
+ mi.setExpression(ast.newSimpleName(LOGGER_CLASS_NAME));
+ mi.setName(ast.newSimpleName(LOGGER_METHOD_NAME_GETLOGGER));
+ String implClsName = getImplPackageName() + "." + getImplClassName(portTypeName);
+ StringLiteral sl = ast.newStringLiteral();
+ sl.setLiteralValue(implClsName);
+ mi.arguments().add(sl);
+ vdf.setInitializer(mi);
+ type.bodyDeclarations().add(fd);
+
+ return fd;
+ }
+
+ protected ExpressionStatement createLoggerInvokeStatement(AST ast, String methodName){
+ MethodInvocation methodInvocation = ast.newMethodInvocation();
+ Name fieldName = ast.newSimpleName(LOGGER_FIELD_NAME);
+ methodInvocation.setExpression(fieldName);
+ methodInvocation.setName(ast.newSimpleName(LOGGER_METHOD_NAME_INFO));
+ StringLiteral param = ast.newStringLiteral();
+ param.setLiteralValue("The method: " + methodName + "() is invoked.");
+ methodInvocation.arguments().add(param);
+ ExpressionStatement infoStatement = ast.newExpressionStatement(methodInvocation);
+
+ return infoStatement;
+
+ }*/
+
private Type copyTypeFromOtherASTNode(AST ast, Type type) {
if (type instanceof PrimitiveType) {
return ast.newPrimitiveType(((PrimitiveType) type)
Modified: trunk/ws/plugins/org.jboss.tools.ws.creation.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.creation.ui/META-INF/MANIFEST.MF 2008-06-06 08:52:30 UTC (rev 8594)
+++ trunk/ws/plugins/org.jboss.tools.ws.creation.ui/META-INF/MANIFEST.MF 2008-06-06 08:55:43 UTC (rev 8595)
@@ -20,5 +20,9 @@
org.eclipse.jdt.core,
org.eclipse.jst.ws.ui,
org.jboss.tools.ws.creation.core,
- org.jboss.tools.ws.core
+ org.jboss.tools.ws.core,
+ org.eclipse.jst.ws.creation.ui,
+ org.eclipse.wst.common.modulecore,
+ org.eclipse.wst.common.project.facet.ui,
+ org.jboss.tools.ws.ui
Eclipse-LazyStart: true
Modified: trunk/ws/plugins/org.jboss.tools.ws.creation.ui/plugin.xml
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.creation.ui/plugin.xml 2008-06-06 08:52:30 UTC (rev 8594)
+++ trunk/ws/plugins/org.jboss.tools.ws.creation.ui/plugin.xml 2008-06-06 08:55:43 UTC (rev 8595)
@@ -54,6 +54,14 @@
insertBeforeCommandId="org.jboss.tools.ws.creation.core.commands.WSProviderInvokeCommand">
</widgetFactory>
</extension>
-
+ <extension
+ point="org.eclipse.wst.common.project.facet.ui.wizardPages">
+ <wizard-pages
+ action="jbossws.core.install">
+ <page
+ class="org.jboss.tools.ws.creation.ui.project.facet.JBossWSFacetInstallPage">
+ </page>
+ </wizard-pages>
+ </extension>
</plugin>
Added: trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/project/facet/JBossWSFacetInstallPage.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/project/facet/JBossWSFacetInstallPage.java (rev 0)
+++ trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/project/facet/JBossWSFacetInstallPage.java 2008-06-06 08:55:43 UTC (rev 8595)
@@ -0,0 +1,200 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.ws.creation.ui.project.facet;
+
+import java.util.ArrayList;
+import java.util.EventObject;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.MouseAdapter;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.wst.common.frameworks.datamodel.DataModelEvent;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModelListener;
+import org.eclipse.wst.common.project.facet.ui.AbstractFacetWizardPage;
+import org.eclipse.wst.common.project.facet.ui.IFacetWizardPage;
+import org.jboss.tools.ws.core.classpath.JbossWSRuntime;
+import org.jboss.tools.ws.core.facet.delegate.IJBossWSFacetDataModelProperties;
+import org.jboss.tools.ws.core.utils.JbossWSCoreUtils;
+import org.jboss.tools.ws.ui.preferences.JbossRuntimeListFieldEditor;
+
+/**
+ * @author Dennyxu
+ *
+ */
+public class JBossWSFacetInstallPage extends AbstractFacetWizardPage implements
+ IFacetWizardPage, IDataModelListener {
+
+ private Button btnServerSupplied;
+ private Button btnUserSupplied;
+ private Combo cmbRuntimes;
+ private Button btnDeploy;
+ private Button btnNew;
+
+ private IDataModel model;
+
+ public JBossWSFacetInstallPage() {
+ super("JBossWS Facet");
+ setTitle("JBossWS Facet");
+ setDescription("Select JBossWS Web Service runtime");
+ }
+
+ public void setConfig(Object config) {
+ this.model = (IDataModel)config;
+
+ }
+
+ public void createControl(Composite parent) {
+ initializeDialogUnits(parent);
+
+ Composite composite = new Composite(parent, SWT.NONE);
+
+
+ GridLayout gridLayout = new GridLayout(4, false);
+ composite.setLayout(gridLayout);
+
+ btnServerSupplied = new Button(composite, SWT.RADIO);
+ btnServerSupplied.addSelectionListener(new SelectionAdapter(){
+ public void widgetSelected(SelectionEvent e) {
+ setServerSuppliedSelection(e);
+ }
+ });
+ GridData gd = new GridData();
+
+ gd.horizontalSpan = 1;
+ btnServerSupplied.setLayoutData(gd);
+
+ Label lblServerSupplied = new Label(composite, SWT.NONE);
+ lblServerSupplied.addMouseListener(new MouseAdapter(){
+ public void mouseDown(MouseEvent e) {
+ btnServerSupplied.setSelection(true);
+ setServerSuppliedSelection(e);
+ }
+ });
+ lblServerSupplied.setText("Server Supplied JBossWS Runtime");
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalSpan = 3;
+ lblServerSupplied.setLayoutData(gd);
+
+ btnUserSupplied = new Button(composite, SWT.RADIO);
+ btnUserSupplied.addSelectionListener(new SelectionAdapter(){
+ public void widgetSelected(SelectionEvent e) {
+ setUserSuppliedSelection(e);
+ }
+ });
+
+
+ cmbRuntimes = new Combo(composite, SWT.READ_ONLY);
+ initializeRuntimesCombo(cmbRuntimes);
+ cmbRuntimes.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ cmbRuntimes.addSelectionListener(new SelectionAdapter(){
+ public void widgetSelected(SelectionEvent e) {
+ String runtimeName = cmbRuntimes.getText();
+ JbossWSRuntime jr = (JbossWSRuntime)cmbRuntimes.getData(runtimeName);
+ model.setStringProperty(IJBossWSFacetDataModelProperties.JBOSS_WS_RUNTIME_HOME, jr.getHomeDir());
+ model.setStringProperty(IJBossWSFacetDataModelProperties.JBOSS_WS_RUNTIME_ID, runtimeName);
+ }
+ });
+
+ btnDeploy = new Button(composite, SWT.CHECK);
+ btnDeploy.setText("Deploy");
+ btnDeploy.addSelectionListener(new SelectionAdapter(){
+ public void widgetSelected(SelectionEvent e) {
+ model.setBooleanProperty(IJBossWSFacetDataModelProperties.JBOSS_WS_DEPLOY, btnDeploy.getSelection());
+ }
+ });
+
+ btnNew = new Button(composite, SWT.NONE);
+ btnNew.setText("New...");
+ btnNew.addSelectionListener(new SelectionAdapter(){
+ public void widgetSelected(SelectionEvent e) {
+ newJBossWSRuntime();
+ }
+ });
+
+ setControl(composite);
+
+
+
+
+ }
+
+ protected void setServerSuppliedSelection(EventObject e) {
+ btnUserSupplied.setSelection(false);
+ model.setBooleanProperty(IJBossWSFacetDataModelProperties.JBOSS_WS_RUNTIME_IS_SERVER_SUPPLIED, true);
+ enableUserSupplied(false);
+
+ }
+
+ protected void setUserSuppliedSelection(EventObject e) {
+ btnServerSupplied.setSelection(false);
+ model.setBooleanProperty(IJBossWSFacetDataModelProperties.JBOSS_WS_RUNTIME_IS_SERVER_SUPPLIED, false);
+ String runtimeId = cmbRuntimes.getText();
+ model.setStringProperty(IJBossWSFacetDataModelProperties.JBOSS_WS_RUNTIME_ID, runtimeId);
+ enableUserSupplied(true);
+
+ }
+
+ protected void enableUserSupplied(boolean enabled){
+ cmbRuntimes.setEnabled(enabled);
+ btnDeploy.setEnabled(enabled);
+ btnNew.setEnabled(enabled);
+
+ }
+
+ protected void initializeRuntimesCombo(Combo cmRuntime){
+ Map<String, JbossWSRuntime> mpRuntimes = JbossWSCoreUtils.getJbossWSRutntimeMap();
+ int i = -1;
+ for(String key: mpRuntimes.keySet()){
+ i++;
+ JbossWSRuntime jr = mpRuntimes.get(key);
+ cmRuntime.add(jr.getName());
+ cmRuntime.setData(jr.getName(), jr.getHomeDir());
+
+ //get default jbossws runtime
+ if(jr.isDefault()){
+ cmRuntime.select(i);
+ }
+ }
+ }
+
+ /*
+ * create a new jbossws runtime and set user supplied runtime to the new one
+ */
+ protected void newJBossWSRuntime(){
+ List<JbossWSRuntime> exists = new ArrayList<JbossWSRuntime>();
+ List<JbossWSRuntime> added = new ArrayList<JbossWSRuntime>();
+ exists.addAll(JbossWSCoreUtils.getJbossWSRutntimeMap().values());
+ JbossRuntimeListFieldEditor.JbossWSRuntimeNewWizard newRtwizard = new JbossRuntimeListFieldEditor.JbossWSRuntimeNewWizard(exists, added);
+ WizardDialog dialog = new WizardDialog(Display.getCurrent().getActiveShell(), newRtwizard);
+ if(dialog.open() == dialog.OK){
+ initializeRuntimesCombo(cmbRuntimes);
+ cmbRuntimes.select(cmbRuntimes.getItemCount() - 1);
+ }
+ }
+
+ public void propertyChanged(DataModelEvent event) {
+
+ }
+
+}
\ No newline at end of file
Modified: trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences/JbossRuntimeListFieldEditor.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences/JbossRuntimeListFieldEditor.java 2008-06-06 08:52:30 UTC (rev 8594)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences/JbossRuntimeListFieldEditor.java 2008-06-06 08:55:43 UTC (rev 8595)
@@ -617,8 +617,10 @@
JbossWSRuntime rt = page1.getRuntime();
added.add(rt);
value.add(rt);
+
return true;
}
+
}
/**
15 years, 11 months
JBoss Tools SVN: r8594 - trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2008-06-06 04:52:30 -0400 (Fri, 06 Jun 2008)
New Revision: 8594
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/FigureFactory.java
Log:
JBIDE-2280 add arrow to redirects
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/FigureFactory.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/FigureFactory.java 2008-06-06 08:16:03 UTC (rev 8593)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/FigureFactory.java 2008-06-06 08:52:30 UTC (rev 8594)
@@ -12,6 +12,8 @@
import org.eclipse.draw2d.ColorConstants;
import org.eclipse.draw2d.ManhattanConnectionRouter;
+import org.eclipse.draw2d.PolygonDecoration;
+import org.eclipse.draw2d.geometry.PointList;
import org.eclipse.swt.graphics.Color;
import org.jboss.tools.seam.ui.pages.editor.ecore.pages.Link;
import org.jboss.tools.seam.ui.pages.editor.edit.LinkEditPart;
@@ -22,13 +24,32 @@
public static final Color selectedColor = new Color(null, 0x44, 0xa9, 0xf3);
public static final Color highlightColor = ColorConstants.black;
+ public static final PointList TRIANGLE_TIP = new PointList();
+
+ static {
+ TRIANGLE_TIP.addPoint(0, 0);
+ TRIANGLE_TIP.addPoint(-1, -1);
+ TRIANGLE_TIP.addPoint(-7, -4);
+ TRIANGLE_TIP.addPoint(-8, -4);
+ TRIANGLE_TIP.addPoint(-8, 4);
+ TRIANGLE_TIP.addPoint(0, 0);
+ }
+
public static ConnectionFigure createNewBendableWire(LinkEditPart part,
Link link) {
ConnectionFigure conn = new ConnectionFigure(part);
conn.setForegroundColor(normalColor);
+
+ PolygonDecoration decor = new PolygonDecoration();
+ decor.setBackgroundColor(NodeFigure.whiteColor);
+ decor.setTemplate(TRIANGLE_TIP);
+ decor.setScale(1, 1);
+
+ conn.setTargetDecoration(decor);
+
return conn;
}
-
+
public static ConnectionFigure createNewLink(Link link) {
ConnectionFigure conn = new ConnectionFigure();
15 years, 11 months