JBoss Tools SVN: r18360 - trunk/as/plugins/org.jboss.ide.eclipse.as.core.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2009-10-29 18:32:01 -0400 (Thu, 29 Oct 2009)
New Revision: 18360
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml
Log:
JBIDE-5123 - also make it so deploy-only servers cannot be started or stopped
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml 2009-10-29 22:24:08 UTC (rev 18359)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml 2009-10-29 22:32:01 UTC (rev 18360)
@@ -135,7 +135,6 @@
description="A server which only provides a deploy folder for publishing."
hasConfiguration="false"
id="org.jboss.ide.eclipse.as.systemCopyServer"
- launchConfigId="org.jboss.ide.eclipse.as.core.server.stripped.launchConfiguration"
name="JBoss Deploy-Only Server"
runtime="false"
runtimeTypeId="org.jboss.ide.eclipse.as.runtime.stripped"
15 years, 4 months
JBoss Tools SVN: r18359 - trunk/as/plugins/org.jboss.ide.eclipse.as.core.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2009-10-29 18:24:08 -0400 (Thu, 29 Oct 2009)
New Revision: 18359
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml
Log:
JBIDE-5123 - icon can now show through for local deploy server in Servers View
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml 2009-10-29 21:49:45 UTC (rev 18358)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml 2009-10-29 22:24:08 UTC (rev 18359)
@@ -135,15 +135,10 @@
description="A server which only provides a deploy folder for publishing."
hasConfiguration="false"
id="org.jboss.ide.eclipse.as.systemCopyServer"
- initialState="stopped"
launchConfigId="org.jboss.ide.eclipse.as.core.server.stripped.launchConfiguration"
- launchModes="run"
name="JBoss Deploy-Only Server"
- runtime="true"
+ runtime="false"
runtimeTypeId="org.jboss.ide.eclipse.as.runtime.stripped"
- startBeforePublish="false"
- startTimeout="100000"
- stopTimeout="100000"
supportsRemoteHosts="true"/>
</extension>
15 years, 4 months
JBoss Tools SVN: r18358 - trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/xpl.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2009-10-29 17:49:45 -0400 (Thu, 29 Oct 2009)
New Revision: 18358
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/xpl/ServerActionProvider.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/xpl/ServerContentProvider.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/xpl/ServerLabelProvider.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/xpl/ServersView.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/xpl/ServersViewDropAdapterAssistant.java
Log:
JBIDE-5122 - deprecate jboss servers view
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/xpl/ServerActionProvider.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/xpl/ServerActionProvider.java 2009-10-29 21:46:42 UTC (rev 18357)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/xpl/ServerActionProvider.java 2009-10-29 21:49:45 UTC (rev 18358)
@@ -68,7 +68,9 @@
import org.eclipse.wst.server.ui.internal.view.servers.StopAction;
import org.eclipse.wst.server.ui.internal.view.servers.StopModuleAction;
import org.jboss.ide.eclipse.as.ui.actions.ExploreAction;
-
+/**
+ * @deprecated
+ */
public class ServerActionProvider extends CommonActionProvider {
public static final String NEW_MENU_ID = "org.jboss.tools.as.wst.server.ui.internal.cnf.newMenuId"; //$NON-NLS-1$
public static final String SHOW_IN_MENU_ID = "org.jboss.tools.as.wst.server.ui.internal.cnf.showInMenuId"; //$NON-NLS-1$
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/xpl/ServerContentProvider.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/xpl/ServerContentProvider.java 2009-10-29 21:46:42 UTC (rev 18357)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/xpl/ServerContentProvider.java 2009-10-29 21:49:45 UTC (rev 18358)
@@ -40,6 +40,9 @@
import org.eclipse.wst.server.ui.internal.viewers.BaseContentProvider;
import org.jboss.ide.eclipse.as.ui.Messages;
+/**
+ * @deprecated
+ */
public class ServerContentProvider extends BaseContentProvider implements ITreeContentProvider {
public static Object INITIALIZING = new Object();
protected IServerLifecycleListener serverResourceListener;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/xpl/ServerLabelProvider.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/xpl/ServerLabelProvider.java 2009-10-29 21:46:42 UTC (rev 18357)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/xpl/ServerLabelProvider.java 2009-10-29 21:49:45 UTC (rev 18358)
@@ -21,6 +21,7 @@
import org.eclipse.wst.server.ui.internal.view.servers.ModuleServer;
/**
* Server table label provider.
+ * @deprecated
*/
public class ServerLabelProvider extends LabelProvider {
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/xpl/ServersView.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/xpl/ServersView.java 2009-10-29 21:46:42 UTC (rev 18357)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/xpl/ServersView.java 2009-10-29 21:49:45 UTC (rev 18358)
@@ -17,6 +17,7 @@
import org.eclipse.ui.navigator.CommonNavigator;
/**
* A view of servers, their modules, and status.
+ * @deprecated
*/
public class ServersView extends CommonNavigator {
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/xpl/ServersViewDropAdapterAssistant.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/xpl/ServersViewDropAdapterAssistant.java 2009-10-29 21:46:42 UTC (rev 18357)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/xpl/ServersViewDropAdapterAssistant.java 2009-10-29 21:49:45 UTC (rev 18358)
@@ -46,6 +46,11 @@
import org.eclipse.wst.server.ui.internal.ServerUIPlugin;
import org.eclipse.wst.server.ui.internal.actions.RunOnServerActionDelegate;
+/**
+ *
+ * @author rob
+ * @deprecated
+ */
public class ServersViewDropAdapterAssistant extends CommonDropAdapterAssistant {
@SuppressWarnings("unchecked") private List fElements;
15 years, 4 months
JBoss Tools SVN: r18357 - in trunk/as/plugins: org.jboss.ide.eclipse.as.ui and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2009-10-29 17:46:42 -0400 (Thu, 29 Oct 2009)
New Revision: 18357
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/plugin.xml
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.properties
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml
Log:
JBIDE-5122 - deprecate jboss servers view
Modified: trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/plugin.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/plugin.xml 2009-10-29 20:49:26 UTC (rev 18356)
+++ trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/plugin.xml 2009-10-29 21:46:42 UTC (rev 18357)
@@ -148,6 +148,19 @@
</includes>
</viewerContentBinding>
</extension>
+ <extension
+ point="org.eclipse.ui.navigator.viewer">
+ <viewerContentBinding
+ viewerId="org.eclipse.wst.server.ui.ServersView">
+ <includes>
+ <contentExtension
+ isRoot="false"
+ pattern="org.jboss.ide.eclipse.archives.webtools.ui.extensions.filesets">
+ </contentExtension>
+ </includes>
+ </viewerContentBinding>
+ </extension>
+
<extension
point="org.eclipse.ui.preferencePages">
<page
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.properties
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.properties 2009-10-29 20:49:26 UTC (rev 18356)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.properties 2009-10-29 21:46:42 UTC (rev 18357)
@@ -15,7 +15,7 @@
actionSets.serverActions.startServer.label=Start Server
actionSets.serverActions.runApplicationFromSelectedElement.label=Run Application from Selected Element
perspective.name=JBoss AS
-ViewName_JBossServerView=JBoss Server View
+ViewName_JBossServerView=JBoss Server View (Deprecated)
ViewName_ServerLog=Server Log
Bundle-Vendor.0 = JBoss by Red Hat
Bundle-Name.0 = JBossAS Tools
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml 2009-10-29 20:49:26 UTC (rev 18356)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml 2009-10-29 21:46:42 UTC (rev 18357)
@@ -352,8 +352,44 @@
</viewerContentBinding>
</extension>
+ <extension
+ point="org.eclipse.ui.navigator.viewer">
+ <viewerContentBinding
+ viewerId="org.jboss.ide.eclipse.as.ui.views.JBossServerView">
+ <includes>
+ <contentExtension
+ isRoot="false"
+ pattern="org.jboss.ide.eclipse.as.ui.extensions.xml">
+ </contentExtension>
+ <contentExtension
+ isRoot="false"
+ pattern="org.jboss.ide.eclipse.as.ui.extensions.jmx">
+ </contentExtension>
+ <contentExtension
+ isRoot="false"
+ pattern="org.jboss.tools.jmx.ui.internal.views.navigator.JMXLinkHelper">
+ </contentExtension>
+ </includes>
+ </viewerContentBinding>
+ <viewerActionBinding
+ viewerId="org.jboss.ide.eclipse.as.ui.views.JBossServerView">
+ <includes>
+ <actionExtension
+ pattern="org.jboss.ide.eclipse.as.ui.extensions.modules"/>
+ <actionExtension
+ pattern="org.jboss.ide.eclipse.as.ui.extensions.serverLog"/>
+ <actionExtension
+ pattern="org.jboss.ide.eclipse.as.ui.extensions.showInJMXView"/>
+ <actionExtension
+ pattern="org.jboss.tools.jmx.ui.internal.views.navigator.actionProvider">
+ </actionExtension>
+ </includes>
+ </viewerActionBinding>
+ </extension>
+
+
<!-- Extensions to new Server View -->
<extension
@@ -458,11 +494,10 @@
</extension>
-
<extension
point="org.eclipse.ui.navigator.viewer">
<viewerContentBinding
- viewerId="org.jboss.ide.eclipse.as.ui.views.JBossServerView">
+ viewerId="org.eclipse.wst.server.ui.ServersView">
<includes>
<contentExtension
isRoot="false"
@@ -479,7 +514,7 @@
</includes>
</viewerContentBinding>
<viewerActionBinding
- viewerId="org.jboss.ide.eclipse.as.ui.views.JBossServerView">
+ viewerId="org.eclipse.wst.server.ui.ServersView">
<includes>
<actionExtension
pattern="org.jboss.ide.eclipse.as.ui.extensions.modules"/>
@@ -495,7 +530,6 @@
</extension>
-
<!-- Decorator for xpaths / xml-->
<extension point="org.eclipse.ui.decorators">
<decorator
15 years, 4 months
JBoss Tools SVN: r18356 - trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2009-10-29 16:49:26 -0400 (Thu, 29 Oct 2009)
New Revision: 18356
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/ComponentContentTest.java
Log:
fix for JsfAllTests.testBody1 (from org.jboss.tools.jsf.vpe.jsf.test.JsfAllTests)
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/ComponentContentTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/ComponentContentTest.java 2009-10-29 20:47:11 UTC (rev 18355)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/ComponentContentTest.java 2009-10-29 20:49:26 UTC (rev 18356)
@@ -19,6 +19,7 @@
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.part.FileEditorInput;
import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
+import org.jboss.tools.test.util.WorkbenchUtils;
import org.jboss.tools.vpe.editor.VpeController;
import org.jboss.tools.vpe.editor.mapping.VpeNodeMapping;
import org.mozilla.interfaces.nsIDOMElement;
@@ -65,18 +66,12 @@
IFile elementPageFile = (IFile) TestUtil.getComponentPath(
elementPagePath, getTestProjectName());
- IEditorInput input = new FileEditorInput(elementPageFile);
+ TestUtil.waitForIdle();
- TestUtil.waitForJobs();
+ IEditorPart editor = WorkbenchUtils.openEditor(elementPageFile,EDITOR_ID);
- IEditorPart editor = PlatformUI.getWorkbench()
- .getActiveWorkbenchWindow().getActivePage().openEditor(input,
- EDITOR_ID, true);
-
assertNotNull(editor);
- TestUtil.waitForJobs();
-
VpeController controller = TestUtil.getVpeController((JSPMultiPageEditor) editor);
// get xml test file
15 years, 4 months
JBoss Tools SVN: r18355 - trunk/tests/tests/org.jboss.tools.test/src/org/jboss/tools/test/util.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2009-10-29 16:47:11 -0400 (Thu, 29 Oct 2009)
New Revision: 18355
Modified:
trunk/tests/tests/org.jboss.tools.test/src/org/jboss/tools/test/util/WorkbenchUtils.java
Log:
openEditor(IFile input, String editorId) and openEditor(String input, String editorId) were added to WorkbenchUtils.class
Modified: trunk/tests/tests/org.jboss.tools.test/src/org/jboss/tools/test/util/WorkbenchUtils.java
===================================================================
--- trunk/tests/tests/org.jboss.tools.test/src/org/jboss/tools/test/util/WorkbenchUtils.java 2009-10-29 20:44:19 UTC (rev 18354)
+++ trunk/tests/tests/org.jboss.tools.test/src/org/jboss/tools/test/util/WorkbenchUtils.java 2009-10-29 20:47:11 UTC (rev 18355)
@@ -13,6 +13,7 @@
import junit.framework.TestCase;
+import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
@@ -98,6 +99,26 @@
}
return part;
}
+
+ public static IEditorPart openEditor(String inputFile, String editorId) {
+ IEditorPart part = null;
+ try {
+ part = IDE.openEditor(getWorkbenchActivePage(),ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(inputFile)),editorId);
+ } catch (PartInitException e) {
+ e.printStackTrace();
+ }
+ return part;
+ }
+
+ public static IEditorPart openEditor(IFile inputFile, String editorId) {
+ IEditorPart part = null;
+ try {
+ part = IDE.openEditor(getWorkbenchActivePage(),inputFile,editorId);
+ } catch (PartInitException e) {
+ e.printStackTrace();
+ }
+ return part;
+ }
public static void closeAllEditors() {
getWorkbenchActivePage().closeAllEditors(false);
15 years, 4 months
JBoss Tools SVN: r18354 - trunk/jsf/tests/org.jboss.tools.jsf.vpe.jstl.test/resources/jstlTests.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2009-10-29 16:44:19 -0400 (Thu, 29 Oct 2009)
New Revision: 18354
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jstl.test/resources/jstlTests/.project
Log:
error in JstlAllTests.testCatch (from org.jboss.tools.jsf.vpe.jstl.test.JstlAllTests) was fixed
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jstl.test/resources/jstlTests/.project
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jstl.test/resources/jstlTests/.project 2009-10-29 15:28:23 UTC (rev 18353)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jstl.test/resources/jstlTests/.project 2009-10-29 20:44:19 UTC (rev 18354)
@@ -6,11 +6,6 @@
</projects>
<buildSpec>
<buildCommand>
- <name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
<name>org.eclipse.wst.common.project.facet.core.builder</name>
<arguments>
</arguments>
@@ -21,11 +16,6 @@
</arguments>
</buildCommand>
<buildCommand>
- <name>org.eclipse.wst.validation.validationbuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
<name>org.jboss.tools.common.verification.verifybuilder</name>
<arguments>
</arguments>
@@ -37,6 +27,5 @@
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.jboss.tools.jsf.jsfnature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
- <nature>org.eclipse.wst.jsdt.core.jsNature</nature>
</natures>
</projectDescription>
15 years, 4 months
JBoss Tools SVN: r18353 - trunk/jsf/docs/userguide/en/modules.
by jbosstools-commits@lists.jboss.org
Author: smukhina
Date: 2009-10-29 11:28:23 -0400 (Thu, 29 Oct 2009)
New Revision: 18353
Modified:
trunk/jsf/docs/userguide/en/modules/editors.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-913
Ability to select tags back and forward is added to VPE selection bar - mentioned in visual web tools guide, selection bar section.
Modified: trunk/jsf/docs/userguide/en/modules/editors.xml
===================================================================
--- trunk/jsf/docs/userguide/en/modules/editors.xml 2009-10-29 15:20:26 UTC (rev 18352)
+++ trunk/jsf/docs/userguide/en/modules/editors.xml 2009-10-29 15:28:23 UTC (rev 18353)
@@ -1728,7 +1728,7 @@
<para>You can find useful one more functionality provided by VPE. At the bottom of the
<property>Visual/Source view</property> there is a <property>Selection Tag
Bar</property>. It allows to see tags tree for a current component selected in
- Visual or Source mode.</para>
+ Visual or Source mode and allows to select tags back and forward.</para>
<figure>
<title>Selection Tag Bar</title>
15 years, 4 months
JBoss Tools SVN: r18352 - in trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors: model and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2009-10-29 11:20:26 -0400 (Thu, 29 Oct 2009)
New Revision: 18352
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ExportImageAction.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ToggleForeignKeyConstraintAction.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/model/Connection.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/model/ElementsFactory.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/model/OrmDiagram.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4956 - fixed
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ExportImageAction.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ExportImageAction.java 2009-10-29 14:45:30 UTC (rev 18351)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ExportImageAction.java 2009-10-29 15:20:26 UTC (rev 18352)
@@ -41,6 +41,12 @@
import org.jboss.tools.hibernate.ui.diagram.DiagramViewerMessages;
import org.jboss.tools.hibernate.ui.diagram.editors.DiagramViewer;
+/**
+ * Export image into selected image format.
+ * "png", "jpg", "bmp" are supported.
+ *
+ * @author Vitali Yemialyanchyk
+ */
public class ExportImageAction extends DiagramBaseAction {
public static final String ACTION_ID = "export_as_image_id"; //$NON-NLS-1$
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ToggleForeignKeyConstraintAction.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ToggleForeignKeyConstraintAction.java 2009-10-29 14:45:30 UTC (rev 18351)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ToggleForeignKeyConstraintAction.java 2009-10-29 15:20:26 UTC (rev 18352)
@@ -51,7 +51,6 @@
@Override
public boolean isEnabled() {
- // TODO: JBIDE-4956 -> still not implemented
- return false;
+ return true;
}
}
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/model/Connection.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/model/Connection.java 2009-10-29 14:45:30 UTC (rev 18351)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/model/Connection.java 2009-10-29 15:20:26 UTC (rev 18352)
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007 Red Hat, Inc.
+ * Copyright (c) 2007-2009 Red Hat, Inc.
* Distributed under license by Red Hat, Inc. All rights reserved.
* This program is made available under the terms of the
* Eclipse Public License v1.0 which accompanies this distribution,
@@ -10,6 +10,11 @@
******************************************************************************/
package org.jboss.tools.hibernate.ui.diagram.editors.model;
+import org.hibernate.mapping.Column;
+import org.hibernate.mapping.Property;
+import org.hibernate.mapping.RootClass;
+import org.hibernate.mapping.Table;
+
/**
* Directed connection between 2 shapes, from source to target.
*
@@ -21,6 +26,9 @@
protected Shape source;
protected Shape target;
+ /**
+ * supported connection types
+ */
public enum ConnectionType {
ClassMapping,
PropertyMapping,
@@ -51,17 +59,43 @@
return target;
}
+ /**
+ * Detect connection type from connected source and target.
+ *
+ * @return
+ */
public ConnectionType getConnectionType() {
- if ((source instanceof OrmShape) && (target instanceof OrmShape)) {
- return ConnectionType.ClassMapping;
+ if (source instanceof OrmShape && target instanceof OrmShape) {
+ if ((source.getOrmElement() instanceof Table) && (target.getOrmElement() instanceof Table)) {
+ return ConnectionType.ForeignKeyConstraint;
+ }
+ boolean bClassMapping = true;
+ if (!(source.getOrmElement() instanceof RootClass || source.getOrmElement() instanceof Table)) {
+ bClassMapping = false;
+ }
+ if (!(target.getOrmElement() instanceof RootClass || target.getOrmElement() instanceof Table)) {
+ bClassMapping = false;
+ }
+ if (bClassMapping) {
+ return ConnectionType.ClassMapping;
+ }
}
- if ((source instanceof OrmShape) || (target instanceof OrmShape)) {
- return ConnectionType.Association;
+ if ((source.getOrmElement() instanceof Table && target.getOrmElement() instanceof Table) ||
+ (source.getOrmElement() instanceof Table && target.getOrmElement() instanceof Column) ||
+ (source.getOrmElement() instanceof Column && target.getOrmElement() instanceof Table) ||
+ (source.getOrmElement() instanceof Column && target.getOrmElement() instanceof Column)) {
+ return ConnectionType.ForeignKeyConstraint;
}
- // TODO: what is ForeignKeyConstraint?
- //if ( ??? ) {
- // return ConnectionType.ForeignKeyConstraint;
- //}
+ if (((source instanceof OrmShape) ^ (target instanceof OrmShape))) {
+ boolean bAssociation = true;
+ if (!(!(source instanceof OrmShape) && source.getOrmElement() instanceof Property) &&
+ !(!(target instanceof OrmShape) && target.getOrmElement() instanceof Property)) {
+ bAssociation = false;
+ }
+ if (bAssociation) {
+ return ConnectionType.Association;
+ }
+ }
return ConnectionType.PropertyMapping;
}
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/model/ElementsFactory.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/model/ElementsFactory.java 2009-10-29 14:45:30 UTC (rev 18351)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/model/ElementsFactory.java 2009-10-29 15:20:26 UTC (rev 18352)
@@ -21,6 +21,7 @@
import org.hibernate.mapping.Column;
import org.hibernate.mapping.Component;
import org.hibernate.mapping.DependantValue;
+import org.hibernate.mapping.ForeignKey;
import org.hibernate.mapping.Join;
import org.hibernate.mapping.OneToMany;
import org.hibernate.mapping.PersistentClass;
@@ -34,8 +35,10 @@
import org.hibernate.type.Type;
/**
+ * Responsible to create diagram elements for given
+ * Hibernate Console Configuration.
*
- * @author Vitali
+ * @author Vitali Yemialyanchyk
*/
public class ElementsFactory {
@@ -50,6 +53,45 @@
this.connections = connections;
}
+ @SuppressWarnings("unchecked")
+ public void createForeingKeyConnections() {
+ Iterator<OrmShape> it = elements.values().iterator();
+ while (it.hasNext()) {
+ final OrmShape shape = it.next();
+ Object ormElement = shape.getOrmElement();
+ if (ormElement instanceof Table) {
+ Table databaseTable = (Table)ormElement;
+ Iterator<ForeignKey> itFK = (Iterator<ForeignKey>)databaseTable.getForeignKeyIterator();
+ while (itFK.hasNext()) {
+ final ForeignKey fk = itFK.next();
+ Table referencedTable = fk.getReferencedTable();
+ final OrmShape referencedShape = getOrCreateDatabaseTable(referencedTable);
+ //
+ Iterator<Column> itColumns = (Iterator<Column>)fk.columnIterator();
+ while (itColumns.hasNext()) {
+ Column col = itColumns.next();
+ Shape shapeColumn = shape.getChild(col);
+ Iterator<Column> itReferencedColumns = null;
+ if (fk.isReferenceToPrimaryKey()) {
+ itReferencedColumns =
+ (Iterator<Column>)referencedTable.getPrimaryKey().columnIterator();
+ } else {
+ itReferencedColumns =
+ (Iterator<Column>)fk.getReferencedColumns().iterator();
+ }
+ while (itReferencedColumns != null && itReferencedColumns.hasNext()) {
+ Column colReferenced = itReferencedColumns.next();
+ Shape shapeReferencedColumn = referencedShape.getChild(colReferenced);
+ if (shouldCreateConnection(shapeColumn, shapeReferencedColumn)) {
+ connections.add(new Connection(shapeColumn, shapeReferencedColumn));
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
public void createChildren(BaseElement element) {
if (element.getClass().equals(ExpandableShape.class)) {
processExpand((ExpandableShape)element);
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/model/OrmDiagram.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/model/OrmDiagram.java 2009-10-29 14:45:30 UTC (rev 18351)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/model/OrmDiagram.java 2009-10-29 15:20:26 UTC (rev 18352)
@@ -187,6 +187,7 @@
}
updateChildrenList();
factory.createChildren(this);
+ factory.createForeingKeyConnections();
updateChildrenList();
if (getChildrenNumber() == 0) {
String error = DiagramViewerMessages.MessageShape_warning;
15 years, 4 months
JBoss Tools SVN: r18351 - trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2009-10-29 10:45:30 -0400 (Thu, 29 Oct 2009)
New Revision: 18351
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/ValidationContext.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5115
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/ValidationContext.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/ValidationContext.java 2009-10-29 13:57:01 UTC (rev 18350)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/ValidationContext.java 2009-10-29 14:45:30 UTC (rev 18351)
@@ -11,6 +11,7 @@
package org.jboss.tools.jst.web.kb.internal.validation;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -182,7 +183,9 @@
* @see org.jboss.tools.seam.internal.core.validation.ISeamValidationContext#clearRegisteredFiles()
*/
public void clearRegisteredFiles() {
- rootContext.clearRegisteredFiles();
+ if(rootContext!=null) {
+ rootContext.clearRegisteredFiles();
+ }
}
/*
@@ -212,6 +215,9 @@
* @see org.jboss.tools.seam.internal.core.validation.ISeamValidationContext#getRegisteredFiles()
*/
public Set<IFile> getRegisteredFiles() {
+ if(rootContext==null) {
+ return Collections.emptySet();
+ }
return rootContext.getRegisteredFiles();
}
@@ -219,6 +225,9 @@
* @see org.jboss.tools.seam.internal.core.validation.ISeamValidationContext#getRemovedFiles()
*/
public Set<IFile> getRemovedFiles() {
+ if(rootContext==null) {
+ return Collections.emptySet();
+ }
return rootContext.getRemovedFiles();
}
15 years, 4 months