JBoss Tools SVN: r22054 - in trunk: esb/plugins/org.jboss.tools.esb.project.core and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2010-05-13 07:27:22 -0400 (Thu, 13 May 2010)
New Revision: 22054
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml
trunk/esb/plugins/org.jboss.tools.esb.project.core/plugin.xml
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/ESBProjectWizard.java
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/ESBProjectFirstPage.java
Log:
JBIDE-6056
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml 2010-05-13 10:42:14 UTC (rev 22053)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml 2010-05-13 11:27:22 UTC (rev 22054)
@@ -769,7 +769,7 @@
id="org.jboss.ide.eclipse.as.runtime.component"
version="6.0"/>
<facet id="jst.web" version="2.2,2.3,2.4,2.5"/>
- <facet id="jst.java" version="1.3,1.4,5.0,6.0"/>
+ <facet id="jst.java" version="5.0,6.0"/>
<facet id="jst.utility" version="1.0"/>
<facet id="jst.connector" version="1.0,1.5"/>
<facet id="jst.ejb" version="2.0,2.1,3.0"/>
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.core/plugin.xml
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.core/plugin.xml 2010-05-13 10:42:14 UTC (rev 22053)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.core/plugin.xml 2010-05-13 11:27:22 UTC (rev 22054)
@@ -151,7 +151,7 @@
</facet>
<runtime-component
id="org.jboss.ide.eclipse.as.runtime.component"
- version="4.2,5.0,5.1">
+ version="4.2,5.0,5.1,6.0">
</runtime-component>
</supported>
<supported>
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/ESBProjectWizard.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/ESBProjectWizard.java 2010-05-13 10:42:14 UTC (rev 22053)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/ESBProjectWizard.java 2010-05-13 11:27:22 UTC (rev 22054)
@@ -11,6 +11,7 @@
package org.jboss.tools.esb.project.ui.wizards;
import java.lang.reflect.InvocationTargetException;
+import java.util.Set;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
@@ -31,7 +32,11 @@
import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
import org.eclipse.wst.common.project.facet.core.IFacetedProject;
import org.eclipse.wst.common.project.facet.core.IFacetedProjectTemplate;
+import org.eclipse.wst.common.project.facet.core.IFacetedProjectWorkingCopy;
+import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
+import org.eclipse.wst.common.project.facet.core.events.IFacetedProjectEvent;
+import org.eclipse.wst.common.project.facet.core.events.IFacetedProjectListener;
import org.eclipse.wst.common.project.facet.core.runtime.IRuntime;
import org.eclipse.wst.server.core.ServerCore;
import org.eclipse.wst.web.ui.internal.wizards.NewProjectDataModelFacetWizard;
@@ -48,6 +53,13 @@
public ESBProjectWizard() {
super();
+ Set<IProjectFacetVersion> current = getFacetedProjectWorkingCopy().getProjectFacets();
+ getFacetedProjectWorkingCopy().addListener(new IFacetedProjectListener(){
+ public void handleEvent(IFacetedProjectEvent event) {
+ System.out.println("runtime changed" + event.getWorkingCopy().getPrimaryRuntime().getName());
+ }}, IFacetedProjectEvent.Type.PRIMARY_RUNTIME_CHANGED);
+ IRuntime rt = getFacetedProjectWorkingCopy().getPrimaryRuntime();
+ getFacetedProjectWorkingCopy().setProjectFacets(current);
setWindowTitle(JBossESBUIMessages.ESBProjectWizard_Title);
setDefaultPageImageDescriptor(ESBSharedImages.getImageDescriptor(ESBSharedImages.WIZARD_NEW_PROJECT));
}
@@ -64,6 +76,14 @@
return DataModelFactory.createDataModel(new JBossESBFacetProjectCreationDataModelProvider());
}
+ private IFacetedProjectWorkingCopy fpjwc;
+
+ @Override
+ public void setFacetedProjectWorkingCopy( final IFacetedProjectWorkingCopy fpjwc ) {
+ super.setFacetedProjectWorkingCopy(fpjwc);
+ this.fpjwc = fpjwc;
+ }
+
@Override
protected IWizardPage createFirstPage() {
return new ESBProjectFirstPage(model, "first.page"); //$NON-NLS-1$
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/ESBProjectFirstPage.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/ESBProjectFirstPage.java 2010-05-13 10:42:14 UTC (rev 22053)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/ESBProjectFirstPage.java 2010-05-13 11:27:22 UTC (rev 22054)
@@ -41,8 +41,12 @@
return ESBProjectConstant.ESB_PROJECT_FACET;
}
- protected void createPresetPanel(Composite top) {
- new Label(top, SWT.NONE);
+// protected void createPresetPanel(Composite top) {
+// new Label(top, SWT.NONE);
+// }
+ protected void createPrimaryFacetComposite(Composite top) {
+ super.createPrimaryFacetComposite(top);
+ super.handlePrimaryFacetVersionSelectedEvent();
}
@Override
15 years, 11 months
JBoss Tools SVN: r22053 - in trunk/vpe/tests/org.jboss.tools.vpe.ui.test/lib: jmock-2.5.1 and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2010-05-13 06:42:14 -0400 (Thu, 13 May 2010)
New Revision: 22053
Added:
trunk/vpe/tests/org.jboss.tools.vpe.ui.test/lib/jmock-2.5.1/
trunk/vpe/tests/org.jboss.tools.vpe.ui.test/lib/jmock-2.5.1/hamcrest-core-1.1.jar
trunk/vpe/tests/org.jboss.tools.vpe.ui.test/lib/jmock-2.5.1/hamcrest-library-1.1.jar
trunk/vpe/tests/org.jboss.tools.vpe.ui.test/lib/jmock-2.5.1/jmock-2.5.1.jar
Log:
https://jira.jboss.org/jira/browse/JBIDE-6261 ,
https://jira.jboss.org/jira/browse/JBIDE-5042 : Create tests for DnD in VPE.
Added: trunk/vpe/tests/org.jboss.tools.vpe.ui.test/lib/jmock-2.5.1/hamcrest-core-1.1.jar
===================================================================
(Binary files differ)
Property changes on: trunk/vpe/tests/org.jboss.tools.vpe.ui.test/lib/jmock-2.5.1/hamcrest-core-1.1.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/vpe/tests/org.jboss.tools.vpe.ui.test/lib/jmock-2.5.1/hamcrest-library-1.1.jar
===================================================================
(Binary files differ)
Property changes on: trunk/vpe/tests/org.jboss.tools.vpe.ui.test/lib/jmock-2.5.1/hamcrest-library-1.1.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/vpe/tests/org.jboss.tools.vpe.ui.test/lib/jmock-2.5.1/jmock-2.5.1.jar
===================================================================
(Binary files differ)
Property changes on: trunk/vpe/tests/org.jboss.tools.vpe.ui.test/lib/jmock-2.5.1/jmock-2.5.1.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
15 years, 11 months
JBoss Tools SVN: r22052 - in trunk: jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/5042 and 5 other directories.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2010-05-13 06:36:47 -0400 (Thu, 13 May 2010)
New Revision: 22052
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/5042/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/5042/JBIDE-5042.html
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/DnD_JBIDE5042Test.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.test/lib/
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/dnd/VpeDnD.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.test/.classpath
trunk/vpe/tests/org.jboss.tools.vpe.ui.test/META-INF/MANIFEST.MF
trunk/vpe/tests/org.jboss.tools.vpe.ui.test/build.properties
Log:
https://jira.jboss.org/jira/browse/JBIDE-6261 ,
https://jira.jboss.org/jira/browse/JBIDE-5042 : Create tests for DnD in VPE.
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/5042/JBIDE-5042.html
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/5042/JBIDE-5042.html (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/5042/JBIDE-5042.html 2010-05-13 10:36:47 UTC (rev 22052)
@@ -0,0 +1,33 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head id="head-1">
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Insert title here</title>
+<style type="text/css">
+table {
+ background-color: black;
+ table-layout: fixed;
+}
+td {
+ background-color: white;
+}
+td div {
+ width: 100px;
+ height: 100px;
+}
+</style>
+</head>
+<body>
+ <table>
+ <tr>
+ <td><div><input id="draggable" type="button" value="Draggable" style=" width : 85px;">dddddd</div></td><td><div id="cell_01">dddddd</div></td><td><div>dddddd</div></td><td><div>dddddd</div></td>
+ </tr>
+ <tr>
+ <td><div>dddddd</div></td><td><div>dddddd</div></td><td><div>dddddd</div></td><td><div>dddddd</div></td>
+ </tr>
+ <tr>
+ <td><div>dddddd</div></td><td><div>dddddd</div></td><td><div id="dropable ">Dropable</div></td><td><div>dddddd</div></td>
+ </tr>
+ </table>
+</body>
+</html>
\ No newline at end of file
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java 2010-05-13 10:33:49 UTC (rev 22051)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java 2010-05-13 10:36:47 UTC (rev 22052)
@@ -15,6 +15,7 @@
import org.jboss.tools.jsf.vpe.jsf.test.jbide.ChangeMessageBundleTest_JBIDE5818;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.ContextMenuDoubleInsertionTest_JBIDE3888;
+import org.jboss.tools.jsf.vpe.jsf.test.jbide.DnD_JBIDE5042Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.EditFontFamilyTest_JBIDE5872;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.ExceptionInVPEComments_JBIDE5143;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.FacetProcessingTest;
@@ -124,6 +125,7 @@
TestSuite suite = new TestSuite("Tests for Vpe Jsf components"); //$NON-NLS-1$
// $JUnit-BEGIN$
+ suite.addTestSuite(DnD_JBIDE5042Test.class);
suite.addTestSuite(UnclosedELExpressionTest.class);
suite.addTestSuite(TestContextPathResolution.class);
suite.addTestSuite(JBIDE5920Test.class);
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/DnD_JBIDE5042Test.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/DnD_JBIDE5042Test.java (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/DnD_JBIDE5042Test.java 2010-05-13 10:36:47 UTC (rev 22052)
@@ -0,0 +1,198 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jsf.vpe.jsf.test.jbide;
+
+import java.io.IOException;
+import java.lang.reflect.Field;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.part.FileEditorInput;
+import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
+import org.jboss.tools.jsf.vpe.jsf.test.JsfAllTests;
+import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
+import org.jboss.tools.vpe.dnd.VpeDnD;
+import org.jboss.tools.vpe.editor.VpeController;
+import org.jboss.tools.vpe.editor.VpeEditorPart;
+import org.jboss.tools.vpe.editor.mozilla.MozillaEditor;
+import org.jboss.tools.vpe.editor.mozilla.MozillaEventAdapter;
+import org.jboss.tools.vpe.ui.test.TestUtil;
+import org.jboss.tools.vpe.ui.test.VpeTest;
+import org.jmock.Expectations;
+import org.jmock.Mockery;
+import org.jmock.api.Invocation;
+import org.jmock.lib.action.CustomAction;
+import org.mozilla.interfaces.nsIDOMElement;
+import org.mozilla.interfaces.nsIDOMEventTarget;
+import org.mozilla.interfaces.nsIDOMMouseEvent;
+import org.mozilla.interfaces.nsIDOMNSUIEvent;
+import org.mozilla.interfaces.nsIDOMNode;
+import org.mozilla.interfaces.nsIDragService;
+import org.mozilla.interfaces.nsIDragSession;
+import org.mozilla.interfaces.nsIScriptableRegion;
+import org.mozilla.interfaces.nsISupportsArray;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+/**
+ * Tests Drag&Drop functionality of the VPE.
+ *
+ * @see JIRA Issue JBIDE-5042 ( https://jira.jboss.org/jira/browse/JBIDE-5042 ):
+ * "Enhance DnD support in VPE"
+ *
+ * @author yradtsevich
+ */
+public class DnD_JBIDE5042Test extends VpeTest {
+ private static final String DROP_CONTAINER_ID = "cell_01";
+ private static final String DRAG_ICON_ID = "dragIcon";
+ private static final String DRAGGABLE_ID = "draggable"; //$NON-NLS-1$
+ private static final String TEST_PAGE_NAME = "JBIDE/5042/JBIDE-5042.html"; //$NON-NLS-1$
+ private static final Point DRAG_POINT = new Point(0, 0);
+ /**Cells in the table are 100x100px. Thus this point means 'top of the second cell'*/
+ private static final Point DROP_POINT = new Point(150, 10);
+ private Mockery context = new Mockery();
+
+ public DnD_JBIDE5042Test(String name) {
+ super(name);
+ }
+
+ /**
+ * Try to open two pages in VPE and refresh them n times.
+ */
+ public void testDnDWithMocks() throws Throwable {
+ setException(null);
+
+ JSPMultiPageEditor editor = openPageInVpe(TEST_PAGE_NAME);
+ final MozillaEditor visualEditor = ((VpeEditorPart) editor.getVisualEditor())
+ .getVisualEditor();
+ VpeController controller = TestUtil.getVpeController(editor);
+ TestUtil.waitForJobs();
+
+ final nsIDragService dragService = mock(nsIDragService.class);
+ final nsIDragSession dragSession = mock(nsIDragSession.class);
+ checking(new Expectations() {{
+ allowing(dragService).getCurrentSession(); will(returnValue(dragSession));
+ allowing(dragSession).getSourceDocument(); will(returnValue(visualEditor.getDomDocument()));
+ allowing(dragSession).setCanDrop(with(any(Boolean.TYPE)));
+ }});
+ replaceDragService(controller.getVpeDnD(), dragService);
+
+ Element draggable = findSourceElementById(controller, DRAGGABLE_ID);
+ setSelectedNode(controller, draggable);
+ TestUtil.waitForJobs();
+
+ final nsIDOMElement dragIcon = controller.getXulRunnerEditor()
+ .getDOMDocument().getElementById(DRAG_ICON_ID);
+
+ final nsIDOMMouseEvent mouseDownEvent = createMockMouseEvent(
+ DRAG_POINT, "mousedown", dragIcon, "mouseDown");
+ final nsIDOMMouseEvent dragOverMouseEvent = createMockMouseEvent(
+ DROP_POINT, "dragover", null, "dragover");
+ final nsIDOMMouseEvent dragDropMouseEvent = createMockMouseEvent(
+ DROP_POINT, "dragdrop", null, "dragdrop");
+
+ final MozillaEventAdapter eventListener = visualEditor.getMozillaEventAdapter();
+ checking(new Expectations() {{
+ allowing(dragService).invokeDragSession(
+ with(any(nsIDOMNode.class)), with(any(nsISupportsArray.class)),
+ with(any(nsIScriptableRegion.class)), with(any(Long.TYPE)));
+ will(new CustomAction("invokeDragSession") {
+ public Object invoke(Invocation invocation) throws Throwable {
+ eventListener.handleEvent(dragOverMouseEvent);
+ TestUtil.waitForJobs();
+ eventListener.handleEvent(dragDropMouseEvent);
+ TestUtil.waitForJobs();
+ return null;
+ }
+ });
+ }});
+
+ eventListener.handleEvent(mouseDownEvent);
+ TestUtil.waitForJobs();
+
+ draggable = findSourceElementById(controller, DRAGGABLE_ID);
+ assertEquals(DROP_CONTAINER_ID, ((Element)draggable.getParentNode()).getAttribute("id"));
+
+ if (getException() != null) {
+ throw getException();
+ }
+ }
+
+ private nsIDOMMouseEvent createMockMouseEvent(final Point mousePos,
+ final String type, final nsIDOMElement targetElement, String name) {
+ final nsIDOMMouseEvent mouseEvent = mock(nsIDOMMouseEvent.class, name + "_nsIDOMMouseEvent");
+ final nsIDOMEventTarget mouseEventTarget = mock(nsIDOMEventTarget.class, name + "_nsIDOMEventTarget");
+ final nsIDOMNSUIEvent mouseNsUIEvent = mock(nsIDOMNSUIEvent.class, name + "_nsIDOMNSUIEvent");
+
+ checking(new Expectations() {{
+ allowing(mouseEvent).getType(); will(returnValue(type));
+ allowing(mouseEvent).getButton(); will(returnValue(VpeController.LEFT_BUTTON));
+ allowing(mouseEvent).getTarget(); will(returnValue(mouseEventTarget));
+ allowing(mouseEvent).queryInterface(nsIDOMMouseEvent.NS_IDOMMOUSEEVENT_IID); will(returnValue(mouseEvent));
+ allowing(mouseEventTarget).queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID); will(returnValue(targetElement));
+ allowing(mouseEvent).queryInterface(nsIDOMNSUIEvent.NS_IDOMNSUIEVENT_IID); will(returnValue(mouseNsUIEvent));
+ allowing(mouseEvent).getClientX(); will(returnValue(mousePos.x));
+ allowing(mouseEvent).getClientY(); will(returnValue(mousePos.y));
+ allowing(mouseNsUIEvent).getPageX(); will(returnValue(mousePos.x));
+ allowing(mouseNsUIEvent).getPageY(); will(returnValue(mousePos.y));
+ allowing(mouseEvent).stopPropagation();
+ allowing(mouseEvent).preventDefault();
+ }});
+
+ return mouseEvent;
+ }
+
+ private void replaceDragService(VpeDnD vpeDnD, nsIDragService dragService) throws Throwable {
+ Field dragServiceField = vpeDnD.getClass().getDeclaredField("dragService");
+ dragServiceField.setAccessible(true);
+ dragServiceField.set(vpeDnD, dragService);
+ }
+
+ private JSPMultiPageEditor openPageInVpe(final String pageName) throws CoreException,
+ PartInitException, IOException {
+ IFile elementPageFile = (IFile) TestUtil.getComponentPath(
+ pageName, JsfAllTests.IMPORT_PROJECT_NAME);
+ IEditorInput input = new FileEditorInput(elementPageFile);
+
+ JSPMultiPageEditor editor = (JSPMultiPageEditor) PlatformUI.getWorkbench()
+ .getActiveWorkbenchWindow().getActivePage().openEditor(input,
+ EDITOR_ID, true);
+
+ return editor;
+ }
+
+ private void setSelectedNode(VpeController controller, Node node) {
+ IndexedRegion sourceNodeBounds = ((IndexedRegion)node);
+
+ controller.getPageContext().getSourceBuilder().getStructuredTextViewer()
+ .setSelectedRange(sourceNodeBounds.getStartOffset(),
+ sourceNodeBounds.getEndOffset() - sourceNodeBounds.getStartOffset());
+ }
+
+ /** @see org.jmock.Mockery#mock(java.lang.Class, java.lang.String) */
+ public <T> T mock(Class<T> typeToMock, String name) {
+ return context.mock(typeToMock, name);
+ }
+
+ /** @see org.jmock.Mockery#mock(java.lang.Class) */
+ public <T> T mock(Class<T> typeToMock) {
+ return context.mock(typeToMock);
+ }
+
+ /** @see org.jmock.Mockery#checking(Expectations) */
+ public void checking(Expectations expectations) {
+ context.checking(expectations);
+ }
+}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/dnd/VpeDnD.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/dnd/VpeDnD.java 2010-05-13 10:33:49 UTC (rev 22051)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/dnd/VpeDnD.java 2010-05-13 10:36:47 UTC (rev 22052)
@@ -238,8 +238,7 @@
}
private void highlightDropTargets(DropResolver dropResolver, nsIDOMMouseEvent event) {
- nsIDOMDocument document = vpeController.getVisualBuilder()
- .getOriginalTargetNode(event).getOwnerDocument();
+ nsIDOMDocument document = vpeController.getXulRunnerEditor().getDOMDocument();
Point clientCoords = getClientCoords(event);
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.test/.classpath
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.test/.classpath 2010-05-13 10:33:49 UTC (rev 22051)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.test/.classpath 2010-05-13 10:36:47 UTC (rev 22052)
@@ -1,7 +1,10 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry exported="true" kind="lib" path="lib/jmock-2.5.1/hamcrest-library-1.1.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/jmock-2.5.1/hamcrest-core-1.1.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/jmock-2.5.1/jmock-2.5.1.jar"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.test/META-INF/MANIFEST.MF 2010-05-13 10:33:49 UTC (rev 22051)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.test/META-INF/MANIFEST.MF 2010-05-13 10:36:47 UTC (rev 22052)
@@ -24,10 +24,18 @@
org.jboss.tools.tests;bundle-version="2.0.0";visibility:=reexport,
org.jboss.tools.common.resref.core;bundle-version="1.0.0"
Bundle-ActivationPolicy: lazy
-Bundle-ClassPath: vpe-ui-test.jar
-Export-Package: org.jboss.tools.vpe.ui.test,
+Bundle-ClassPath: vpe-ui-test.jar,
+ lib/jmock-2.5.1/jmock-2.5.1.jar,
+ lib/jmock-2.5.1/hamcrest-core-1.1.jar,
+ lib/jmock-2.5.1/hamcrest-library-1.1.jar
+Export-Package: org.hamcrest,
+ org.jboss.tools.vpe.ui.test,
org.jboss.tools.vpe.ui.test.dialog,
- org.jboss.tools.vpe.ui.test.preferences
+ org.jboss.tools.vpe.ui.test.preferences,
+ org.jmock,
+ org.jmock.api,
+ org.jmock.internal,
+ org.jmock.lib.action
Bundle-Vendor: %Bundle-Vendor.0
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.test/build.properties
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.test/build.properties 2010-05-13 10:33:49 UTC (rev 22051)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.test/build.properties 2010-05-13 10:36:47 UTC (rev 22052)
@@ -3,5 +3,6 @@
plugin.xml,\
plugin.properties,\
vpe-ui-test.jar,\
- resources/
+ resources/,\
+ lib/
source.vpe-ui-test.jar = src/
15 years, 11 months
JBoss Tools SVN: r22051 - in trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl: definition and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-05-13 06:33:49 -0400 (Thu, 13 May 2010)
New Revision: 22051
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/Parameter.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/ParameterDefinition.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-6252
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/Parameter.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/Parameter.java 2010-05-13 08:30:54 UTC (rev 22050)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/Parameter.java 2010-05-13 10:33:49 UTC (rev 22051)
@@ -72,4 +72,8 @@
return definition.getAnnotationPosition(annotationTypeName);
}
+ public Set<String> getAnnotationTypes() {
+ return definition.getAnnotationTypes();
+ }
+
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/ParameterDefinition.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/ParameterDefinition.java 2010-05-13 08:30:54 UTC (rev 22050)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/ParameterDefinition.java 2010-05-13 10:33:49 UTC (rev 22051)
@@ -3,6 +3,7 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import java.util.Set;
import org.jboss.tools.cdi.core.IAnnotated;
import org.jboss.tools.cdi.core.IAnnotationDeclaration;
@@ -50,6 +51,10 @@
return annotationsByTypeName.get(annotationTypeName);
}
+ public Set<String> getAnnotationTypes() {
+ return annotationsByTypeName.keySet();
+ }
+
public void setPosition(ITextSourceReference position) {
this.position = position;
}
15 years, 11 months
JBoss Tools SVN: r22050 - in trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces: META-INF and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2010-05-13 04:30:54 -0400 (Thu, 13 May 2010)
New Revision: 22050
Added:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/lib/
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/lib/jhighlight-1.0.jar
Removed:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/lib/jhighlight-1.0.jar
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/.classpath
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/META-INF/MANIFEST.MF
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/build.properties
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInsertTemplate.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-6217 , reverting some changes from https://jira.jboss.org/jira/browse/JBIDE-1636
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/.classpath
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/.classpath 2010-05-13 06:52:51 UTC (rev 22049)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/.classpath 2010-05-13 08:30:54 UTC (rev 22050)
@@ -1,7 +1,8 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry exported="true" kind="lib" path="lib/jhighlight-1.0.jar"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/META-INF/MANIFEST.MF 2010-05-13 06:52:51 UTC (rev 22049)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/META-INF/MANIFEST.MF 2010-05-13 08:30:54 UTC (rev 22050)
@@ -18,7 +18,8 @@
org.jboss.tools.vpe.xulrunner
Bundle-ActivationPolicy: lazy
Bundle-Vendor: %Bundle-Vendor.0
-Bundle-ClassPath: .
+Bundle-ClassPath: lib/jhighlight-1.0.jar,
+ .
Export-Package: org.jboss.tools.jsf.vpe.richfaces,
org.jboss.tools.jsf.vpe.richfaces.template.util
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/build.properties
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/build.properties 2010-05-13 06:52:51 UTC (rev 22049)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/build.properties 2010-05-13 08:30:54 UTC (rev 22050)
@@ -5,6 +5,7 @@
resources/,\
templates/,\
plugin.xml,\
+ lib/jhighlight-1.0.jar,\
plugin.properties,\
about.html
src.includes = src/,\
Copied: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/lib (from rev 21511, trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/lib)
Deleted: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/lib/jhighlight-1.0.jar
===================================================================
(Binary files differ)
Copied: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/lib/jhighlight-1.0.jar (from rev 21511, trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/lib/jhighlight-1.0.jar)
===================================================================
(Binary files differ)
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInsertTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInsertTemplate.java 2010-05-13 06:52:51 UTC (rev 22049)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInsertTemplate.java 2010-05-13 08:30:54 UTC (rev 22050)
@@ -40,6 +40,9 @@
import org.w3c.dom.Text;
import org.xml.sax.SAXException;
+import com.uwyn.jhighlight.renderer.Renderer;
+import com.uwyn.jhighlight.renderer.XhtmlRendererFactory;
+
/**
*
* @author ezheleznyakov(a)exadel.com
@@ -138,16 +141,26 @@
}
}
- if (highlightValue == null) {
+ if ((highlightValue == null) || (!searchInSupportedTypes(highlightValue))){
// finalStr = finalStr.replace('\n', ' ');
nsIDOMText text = visualDocument.createTextNode(finalStr);
div.appendChild(text);
return vpeCreationData;
}
- div.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, ERROR_MESSAGE_STYLE);
- nsIDOMText text = visualDocument.createTextNode(HIGHLIGHT_ERROR_MESSAGE);
- div.appendChild(text);
+ Renderer renderer = XhtmlRendererFactory.getRenderer(highlightValue);
+ String transformStr = null;
+ try {
+ transformStr = renderer.highlight("", finalStr, UTF8, false); //$NON-NLS-1$
+ transformStr = convertString(transformStr, highlightValue);
+ Node node = parseTransformString(transformStr);
+ buildVisualNode(node, div);
+ } catch (IOException e1) {
+ div.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, ERROR_MESSAGE_STYLE);
+ nsIDOMText text = visualDocument.createTextNode(HIGHLIGHT_ERROR_MESSAGE);
+ div.appendChild(text);
+ return vpeCreationData;
+ }
return vpeCreationData;
}
@@ -228,6 +241,30 @@
/**
*
+ * @param highlightValue
+ * value of highlight attribute
+ * @return true of highlight value correct
+ */
+
+ private boolean searchInSupportedTypes(String highlightValue) {
+
+ if (highlightValue == null)
+ return true;
+
+ if (highlightValue.trim().equals(EMPTY_STRING))
+ return false;
+
+ Set<?> set = XhtmlRendererFactory.getSupportedTypes();
+
+ for (Object object : set)
+ if (highlightValue.equalsIgnoreCase((String) object))
+ return true;
+
+ return false;
+ }
+
+ /**
+ *
* @param node
* @param el
* @return
15 years, 11 months
JBoss Tools SVN: r22049 - in branches/jbosstools-3.1.x/hibernatetools: tests/org.jboss.tools.hibernate.ui.test/src/org/jboss/tools/hibernate/ui/diagram/editors/model/test and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2010-05-13 02:52:51 -0400 (Thu, 13 May 2010)
New Revision: 22049
Modified:
branches/jbosstools-3.1.x/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/model/Shape.java
branches/jbosstools-3.1.x/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/model/Utils.java
branches/jbosstools-3.1.x/hibernatetools/tests/org.jboss.tools.hibernate.ui.test/src/org/jboss/tools/hibernate/ui/diagram/editors/model/test/OrmDiagramTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-6186
Modified: branches/jbosstools-3.1.x/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/model/Shape.java
===================================================================
--- branches/jbosstools-3.1.x/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/model/Shape.java 2010-05-13 04:58:42 UTC (rev 22048)
+++ branches/jbosstools-3.1.x/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/model/Shape.java 2010-05-13 06:52:51 UTC (rev 22049)
@@ -153,7 +153,8 @@
@Override
public String getKey() {
- return Utils.getName(getOrmElement());
+ //fix for https://jira.jboss.org/jira/browse/JBIDE-6186
+ return Utils.getName(getOrmElement()).replaceAll("\\$", ".."); //$NON-NLS-1$ //$NON-NLS-2$
}
public void setFocus() {
Modified: branches/jbosstools-3.1.x/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/model/Utils.java
===================================================================
--- branches/jbosstools-3.1.x/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/model/Utils.java 2010-05-13 04:58:42 UTC (rev 22048)
+++ branches/jbosstools-3.1.x/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/model/Utils.java 2010-05-13 06:52:51 UTC (rev 22049)
@@ -57,7 +57,7 @@
res = getTableName((Table)obj);
} else if (obj instanceof Property) {
Property property = (Property)obj;
- res = property.getPersistentClass().getEntityName() + "." + property.getName(); //$NON-NLS-1$
+ res = getName(property.getPersistentClass()) + "." + property.getName(); //$NON-NLS-1$
} else if (obj instanceof SimpleValue) {
SimpleValue sv = (SimpleValue)obj;
res = getTableName(sv.getTable()) + "." + sv.getForeignKeyName(); //$NON-NLS-1$
Modified: branches/jbosstools-3.1.x/hibernatetools/tests/org.jboss.tools.hibernate.ui.test/src/org/jboss/tools/hibernate/ui/diagram/editors/model/test/OrmDiagramTest.java
===================================================================
--- branches/jbosstools-3.1.x/hibernatetools/tests/org.jboss.tools.hibernate.ui.test/src/org/jboss/tools/hibernate/ui/diagram/editors/model/test/OrmDiagramTest.java 2010-05-13 04:58:42 UTC (rev 22048)
+++ branches/jbosstools-3.1.x/hibernatetools/tests/org.jboss.tools.hibernate.ui.test/src/org/jboss/tools/hibernate/ui/diagram/editors/model/test/OrmDiagramTest.java 2010-05-13 06:52:51 UTC (rev 22049)
@@ -47,20 +47,21 @@
rts.add(ioe);
final List<Object> emptyList = new ArrayList<Object>();
final Iterator<Object> emptyListIterator = emptyList.iterator();
-
+ //see https://jira.jboss.org/jira/browse/JBIDE-6186
+ final String innerIntricateName = "myInner$Id";
context.checking(new Expectations() {
{
oneOf(ioe).getEntityName();
- will(returnValue("testEntityName")); //$NON-NLS-1$
+ will(returnValue(innerIntricateName));
allowing(consoleConfig).getConfiguration();
will(returnValue(config));
oneOf(ioe).getEntityName();
- will(returnValue("")); //$NON-NLS-1$
+ will(returnValue(innerIntricateName));
oneOf(ioe).getEntityName();
- will(returnValue("")); //$NON-NLS-1$
+ will(returnValue(innerIntricateName));
oneOf(ioe).getIdentifierProperty();
will(returnValue(null));
@@ -93,7 +94,7 @@
will(returnValue("CCName")); //$NON-NLS-1$
allowing(ioe).getEntityName();
- will(returnValue("")); //$NON-NLS-1$
+ will(returnValue(innerIntricateName));
}
});
final OrmDiagram ormDiagram = new OrmDiagram("", rts) { //$NON-NLS-1$
@@ -101,7 +102,7 @@
return consoleConfig;
}
};
- ormDiagram.saveInFile();
+ ormDiagram.saveInXmlFile();
// test is the folder created
File folder = new File(ormDiagram.getStoreFolderPath().toOSString());
assertTrue(folder.exists() && folder.isDirectory());
15 years, 11 months
JBoss Tools SVN: r22048 - branches/modular_build/build.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-05-13 00:58:42 -0400 (Thu, 13 May 2010)
New Revision: 22048
Modified:
branches/modular_build/build/build.xml
Log:
hide debug comment
Modified: branches/modular_build/build/build.xml
===================================================================
--- branches/modular_build/build/build.xml 2010-05-13 04:57:47 UTC (rev 22047)
+++ branches/modular_build/build/build.xml 2010-05-13 04:58:42 UTC (rev 22048)
@@ -1195,7 +1195,7 @@
<!-- rename previously built & unpacked feature dirs -->
<target name="renameFeatures">
- <echo>${WORKINGDIR}/${COMPONENT}/features</echo>
+ <echo level="debug">${WORKINGDIR}/${COMPONENT}/features</echo>
<for param="artifactJar">
<path>
<dirset dir="${WORKINGDIR}/${COMPONENT}/features" includes="*feature_*" />
15 years, 11 months
JBoss Tools SVN: r22047 - branches/modular_build/drools.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-05-13 00:57:47 -0400 (Thu, 13 May 2010)
New Revision: 22047
Modified:
branches/modular_build/drools/build.xml
Log:
remove trailing slash
Modified: branches/modular_build/drools/build.xml
===================================================================
--- branches/modular_build/drools/build.xml 2010-05-13 04:51:23 UTC (rev 22046)
+++ branches/modular_build/drools/build.xml 2010-05-13 04:57:47 UTC (rev 22047)
@@ -5,7 +5,7 @@
<property name="drools.zip" value="drools-5.1.0.SNAPSHOT-eclipse-all.zip" />
<!-- Configuration Ends -->
- <condition property="WORKINGDIR" value="/home/hudson/static_build_env/jbds/tools/sources/">
+ <condition property="WORKINGDIR" value="/home/hudson/static_build_env/jbds/tools/sources">
<available file="/home/hudson/static_build_env/jbds" type="dir" />
</condition>
<condition property="WORKINGDIR" value="${basedir}/../build" else="${basedir}/../">
15 years, 11 months
JBoss Tools SVN: r22046 - branches/modular_build/drools.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-05-13 00:51:23 -0400 (Thu, 13 May 2010)
New Revision: 22046
Modified:
branches/modular_build/drools/build.xml
Log:
fix defn of COMMON_TOOLS dir
Modified: branches/modular_build/drools/build.xml
===================================================================
--- branches/modular_build/drools/build.xml 2010-05-12 23:01:17 UTC (rev 22045)
+++ branches/modular_build/drools/build.xml 2010-05-13 04:51:23 UTC (rev 22046)
@@ -15,6 +15,15 @@
<mkdir dir="${WORKINGDIR}" />
<echo level="info">WORKINGDIR = ${WORKINGDIR}</echo>
+ <condition property="COMMON_TOOLS" value="/home/hudson/static_build_env/jbds/tools">
+ <available file="/home/hudson/static_build_env/jbds" type="dir" />
+ </condition>
+ <condition property="COMMON_TOOLS" value="${WORKINGDIR}/../tools" else="${java.io.tmpdir}">
+ <available file="${WORKINGDIR}/../tools" type="dir" />
+ </condition>
+ <mkdir dir="${COMMON_TOOLS}" />
+ <echo level="info">COMMON_TOOLS = ${COMMON_TOOLS}</echo>
+
<condition property="build.xml" value="/home/hudson/static_build_env/jbds/tools/sources">
<available file="/home/hudson/static_build_env/jbds/tools/sources/build/build.xml" type="file" />
</condition>
@@ -37,10 +46,13 @@
<property name="COMPONENT" value="${COMPONENT}" />
</ant>
- <delete dir="${WORKINGDIR}/${COMPONENT}" quiet="true" includes="
+ <delete dir="${WORKINGDIR}/${COMPONENT}"
+ quiet="true"
+ includes="
LICENSE-ASL-2.0.txt, README_DEPENDENCIES.txt,
plugins/*.jar
- "/>
+ "
+ />
<ant antfile="${build.xml}" target="renameFeatures">
<property name="COMPONENT" value="${COMPONENT}" />
15 years, 11 months
JBoss Tools SVN: r22045 - in trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui: internal/libprov and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2010-05-12 19:01:17 -0400 (Wed, 12 May 2010)
New Revision: 22045
Modified:
trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/PortletUIActivator.java
trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/libprov/JSFPortletbridgeRuntimeProviderInstallPanel.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-6223 EPP 5.0 as Portlet Target Runtime Provider
Modified: trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/PortletUIActivator.java
===================================================================
--- trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/PortletUIActivator.java 2010-05-12 22:53:22 UTC (rev 22044)
+++ trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/PortletUIActivator.java 2010-05-12 23:01:17 UTC (rev 22045)
@@ -18,6 +18,7 @@
import org.eclipse.wst.common.componentcore.resources.IVirtualFile;
import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
import org.eclipse.wst.common.project.facet.core.IFacetedProject;
+import org.eclipse.wst.common.project.facet.core.IFacetedProjectBase;
import org.eclipse.wst.common.project.facet.core.IProjectFacet;
import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
import org.eclipse.wst.server.core.IRuntime;
@@ -115,23 +116,7 @@
IProject project = ProjectUtilities.getProject(projectName);
try {
IFacetedProject facetedProject = ProjectFacetsManager.create(project);
- if (facetedProject != null) {
- org.eclipse.wst.common.project.facet.core.runtime.IRuntime facetRuntime = facetedProject.getPrimaryRuntime();
- if (facetRuntime == null) {
- return null;
- }
- IRuntime runtime = PortletCoreActivator.getRuntime(facetRuntime);
- if (runtime == null) {
- return null;
- }
- IJBossServerRuntime jbossRuntime = (IJBossServerRuntime)runtime.loadAdapter(IJBossServerRuntime.class, new NullProgressMonitor());
- if (jbossRuntime == null) {
- return null;
- }
- IPath jbossLocation = runtime.getLocation();
- IPath configPath = jbossLocation.append(IJBossServerConstants.SERVER).append(jbossRuntime.getJBossConfiguration());
- return configPath;
- }
+ return getJBossConfigPath(facetedProject);
} catch (CoreException e) {
PortletUIActivator.log(e);
}
@@ -139,6 +124,27 @@
return null;
}
+ public static IPath getJBossConfigPath(IFacetedProjectBase facetedProject) {
+ if (facetedProject != null) {
+ org.eclipse.wst.common.project.facet.core.runtime.IRuntime facetRuntime = facetedProject.getPrimaryRuntime();
+ if (facetRuntime == null) {
+ return null;
+ }
+ IRuntime runtime = PortletCoreActivator.getRuntime(facetRuntime);
+ if (runtime == null) {
+ return null;
+ }
+ IJBossServerRuntime jbossRuntime = (IJBossServerRuntime)runtime.loadAdapter(IJBossServerRuntime.class, new NullProgressMonitor());
+ if (jbossRuntime == null) {
+ return null;
+ }
+ IPath jbossLocation = runtime.getLocation();
+ IPath configPath = jbossLocation.append(IJBossServerConstants.SERVER).append(jbossRuntime.getJBossConfiguration());
+ return configPath;
+ }
+ return null;
+ }
+
public static boolean isJBossPortalRuntime(IDataModel model) {
IPath configPath = getJBossConfigPath(model);
if (configPath == null) {
Modified: trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/libprov/JSFPortletbridgeRuntimeProviderInstallPanel.java
===================================================================
--- trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/libprov/JSFPortletbridgeRuntimeProviderInstallPanel.java 2010-05-12 22:53:22 UTC (rev 22044)
+++ trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/libprov/JSFPortletbridgeRuntimeProviderInstallPanel.java 2010-05-12 23:01:17 UTC (rev 22045)
@@ -1,8 +1,10 @@
package org.jboss.tools.portlet.ui.internal.libprov;
+import java.io.File;
import java.util.ArrayList;
import java.util.List;
+import org.eclipse.core.runtime.IPath;
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
@@ -16,6 +18,7 @@
import org.eclipse.swt.widgets.DirectoryDialog;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Text;
+import org.eclipse.wst.common.project.facet.core.IFacetedProjectBase;
import org.jboss.tools.portlet.core.IPortletConstants;
import org.jboss.tools.portlet.core.libprov.JSFPortletbridgeRuntimeLibraryProviderInstallOperationConfig;
import org.jboss.tools.portlet.ui.Messages;
@@ -68,6 +71,22 @@
}
config.setPortletbridgeHome(portletbridgeRuntime);
}
+ if (portletbridgeRuntime == null || portletbridgeRuntime.length() == 0 ) {
+ IFacetedProjectBase facetedProject = config.getFacetedProject();
+ IPath configPath = PortletUIActivator.getJBossConfigPath(facetedProject);
+ if (configPath != null) {
+ IPath portalPath = configPath.append(IPortletConstants.SERVER_DEFAULT_DEPLOY_GATEIN);
+ File portalFile = portalPath.toFile();
+ if (portalFile != null && portalFile.exists()) {
+ IPath eppHome = configPath.removeLastSegments(3);
+ IPath pbPath = eppHome.append("portletbridge"); //$NON-NLS-1$
+ File pbFile = pbPath.toFile();
+ if (pbFile != null && pbFile.exists()) {
+ portletbridgeRuntime = pbFile.getAbsolutePath();
+ }
+ }
+ }
+ }
folderText.setText(portletbridgeRuntime);
Button folderButton = new Button(portletBridgeGroup, SWT.PUSH);
15 years, 11 months