JBoss Tools SVN: r36173 - branches/jbosstools-3.3.0.M4/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2011-11-04 10:52:31 -0400 (Fri, 04 Nov 2011)
New Revision: 36173
Modified:
branches/jbosstools-3.3.0.M4/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressPublishMethod.java
Log:
JBIDE-9953 - to m4 branch
Modified: branches/jbosstools-3.3.0.M4/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressPublishMethod.java
===================================================================
--- branches/jbosstools-3.3.0.M4/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressPublishMethod.java 2011-11-04 13:02:39 UTC (rev 36172)
+++ branches/jbosstools-3.3.0.M4/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressPublishMethod.java 2011-11-04 14:52:31 UTC (rev 36173)
@@ -6,10 +6,9 @@
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.SubProgressMonitor;
+import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jgit.lib.Repository;
-import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.MessageBox;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.wst.server.core.IModule;
import org.eclipse.wst.server.core.IServer;
@@ -89,19 +88,32 @@
final boolean[] b = new boolean[1];
Display.getDefault().syncExec(new Runnable() {
public void run() {
- MessageBox messageBox = new MessageBox(new Shell(), SWT.ICON_QUESTION | SWT.YES | SWT.NO);
- messageBox.setMessage(message);
- messageBox.setText(title);
- int response = messageBox.open();
- if (response == SWT.YES)
- b[0] = true;
- else
- b[0] = false;
+// MessageBox messageBox = new MessageBox(new Shell(), SWT.ICON_QUESTION | SWT.YES | SWT.NO);
+// messageBox.setMessage(message);
+// messageBox.setText(title);
+// int response = messageBox.open();
+// if (response == SWT.YES)
+// b[0] = true;
+// else
+// b[0] = false;
+ b[0] = MessageDialog.openQuestion(getActiveShell(), title, message);
}
});
return b[0];
}
+ private static Shell getActiveShell() {
+ Display display = Display.getDefault();
+ final Shell[] ret = new Shell[1];
+ display.syncExec(new Runnable() {
+
+ public void run() {
+ ret[0] = Display.getCurrent().getActiveShell();
+ }
+
+ });
+ return ret[0];
+ }
@Override
public IPublishCopyCallbackHandler getCallbackHandler(IPath path,
IServer server) {
13 years, 1 month
JBoss Tools SVN: r36172 - trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2011-11-04 09:02:39 -0400 (Fri, 04 Nov 2011)
New Revision: 36172
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/LocalJBossServerRuntime.java
Log:
JBIDE-9946 - extra space
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/LocalJBossServerRuntime.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/LocalJBossServerRuntime.java 2011-11-04 12:30:35 UTC (rev 36171)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/LocalJBossServerRuntime.java 2011-11-04 13:02:39 UTC (rev 36172)
@@ -67,7 +67,7 @@
String rtVersion = getRuntime().getRuntimeType().getVersion();
String prefix = Messages.jboss;
if( isEAP()) {
- prefix = Messages.jboss + " EAP "; //$NON-NLS-1$
+ prefix = Messages.jboss + " EAP"; //$NON-NLS-1$
if( rtVersion.equals(IJBossToolingConstants.V5_0)) {
rtVersion = "5.x"; //$NON-NLS-1$
}
13 years, 1 month
JBoss Tools SVN: r36170 - in workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.browsersim: src/org/jboss/tools/browsersim and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2011-11-04 06:30:44 -0400 (Fri, 04 Nov 2011)
New Revision: 36170
Added:
workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.browsersim/src/org/jboss/tools/browsersim/EditDevicesDialog.java
Modified:
workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.browsersim/META-INF/MANIFEST.MF
workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.browsersim/src/org/jboss/tools/browsersim/ManageDevicesDialog.java
Log:
https://issues.jboss.org/browse/JBIDE-9539 : Browsersim app for testing mobile/desktop web apps
- added EditDevicesDialog
- made some usability improvements
Modified: workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.browsersim/META-INF/MANIFEST.MF
===================================================================
--- workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.browsersim/META-INF/MANIFEST.MF 2011-11-04 01:43:51 UTC (rev 36169)
+++ workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.browsersim/META-INF/MANIFEST.MF 2011-11-04 10:30:44 UTC (rev 36170)
@@ -5,5 +5,6 @@
Bundle-Version: 1.0.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Require-Bundle: org.eclipse.swt;bundle-version="3.7.0",
- org.jboss.tools.browsersim.webkit;bundle-version="1.0.0"
+ org.jboss.tools.browsersim.webkit;bundle-version="1.0.0",
+ org.eclipse.core.runtime;bundle-version="3.7.0"
Export-Package: org.jboss.tools.browsersim
Added: workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.browsersim/src/org/jboss/tools/browsersim/EditDevicesDialog.java
===================================================================
--- workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.browsersim/src/org/jboss/tools/browsersim/EditDevicesDialog.java (rev 0)
+++ workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.browsersim/src/org/jboss/tools/browsersim/EditDevicesDialog.java 2011-11-04 10:30:44 UTC (rev 36170)
@@ -0,0 +1,156 @@
+package org.jboss.tools.browsersim;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.FocusAdapter;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.VerifyEvent;
+import org.eclipse.swt.events.VerifyListener;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Dialog;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+
+public class EditDevicesDialog extends Dialog {
+ protected Object result;
+ protected Shell shell;
+ private Text textName;
+ private Text textWidth;
+ private Text textHeight;
+ private Text textUserAgent;
+
+ /**
+ * Create the dialog.
+ * @param parent
+ * @param style
+ */
+ public EditDevicesDialog(Shell parent, int style) {
+ super(parent, style);
+ setText("SWT Dialog");
+ }
+
+ /**
+ * Open the dialog.
+ * @return the result
+ */
+ public Object open() {
+ createContents();
+ shell.open();
+ shell.layout();
+ shell.setSize(shell.computeSize(300, SWT.DEFAULT));
+ Display display = getParent().getDisplay();
+ while (!shell.isDisposed()) {
+ if (!display.readAndDispatch()) {
+ display.sleep();
+ }
+ }
+
+ return result;
+ }
+
+ /**
+ * Create contents of the dialog.
+ */
+ private void createContents() {
+ shell = new Shell(getParent(), SWT.DIALOG_TRIM | SWT.MIN | SWT.MAX);
+ shell.setSize(450, 300);
+ shell.setText("Edit Device");
+ shell.setLayout(new GridLayout(2, false));
+
+ Label labelName = new Label(shell, SWT.NONE);
+ labelName.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
+ labelName.setText("Name:");
+
+ textName = new Text(shell, SWT.BORDER);
+ textName.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
+ textName.addFocusListener(new FocusGainedTextListener());
+
+ Label labelWidth = new Label(shell, SWT.NONE);
+ labelWidth.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
+ labelWidth.setText("Width:");
+
+ textWidth = new Text(shell, SWT.BORDER);
+ textWidth.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
+ textWidth.setTextLimit(4);
+ textWidth.addVerifyListener(new VerifyDigitsListener());
+ textWidth.addFocusListener(new FocusLostDigitsListener());
+ textWidth.addFocusListener(new FocusGainedTextListener());
+
+ Label labelHeight = new Label(shell, SWT.NONE);
+ labelHeight.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
+ labelHeight.setText("Height:");
+
+ textHeight = new Text(shell, SWT.BORDER);
+ textHeight.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
+ textHeight.setTextLimit(4);
+ textHeight.addVerifyListener(new VerifyDigitsListener());
+ textHeight.addFocusListener(new FocusLostDigitsListener());
+ textHeight.addFocusListener(new FocusGainedTextListener());
+
+ Label labelUseragent = new Label(shell, SWT.NONE);
+ labelUseragent.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
+ labelUseragent.setText("User-Agent:");
+
+ textUserAgent = new Text(shell, SWT.BORDER);
+ textUserAgent.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
+ textUserAgent.addFocusListener(new FocusGainedTextListener());
+
+ Composite composite = new Composite(shell, SWT.NONE);
+ composite.setLayout(new FillLayout(SWT.HORIZONTAL));
+ composite.setLayoutData(new GridData(SWT.RIGHT, SWT.BOTTOM, true, true, 2, 1));
+
+ Button buttonOk = new Button(composite, SWT.NONE);
+ buttonOk.setText("OK");
+ buttonOk.addSelectionListener(new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent e) {
+ result = new Device(textName.getText(), Integer.valueOf(textWidth.getText()),
+ Integer.valueOf(textHeight.getText()), textUserAgent.getText());
+ shell.close();
+ }
+ });
+ shell.setDefaultButton(buttonOk);
+
+ Button buttonCancel = new Button(composite, SWT.NONE);
+ buttonCancel.setText("Cancel");
+ buttonCancel.addSelectionListener(new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent e) {
+ result = null;
+ shell.close();
+ }
+ });
+ }
+}
+
+final class VerifyDigitsListener implements VerifyListener {
+ public void verifyText(VerifyEvent e) {
+ for (char c : e.text.toCharArray()) {
+ if (!('0' <= c && c <= '9')) {
+ e.doit = false;
+ return;
+ }
+ }
+ }
+}
+
+final class FocusLostDigitsListener extends FocusAdapter {
+ public void focusLost(FocusEvent e) {
+ Text text = ((Text) e.widget);
+ if (text.getText().trim().isEmpty()) {
+ text.setText("0");
+ }
+ }
+}
+
+final class FocusGainedTextListener extends FocusAdapter {
+ public void focusGained(FocusEvent e) {
+ Text text = ((Text) e.widget);
+ text.setSelection(0, text.getText().length());
+ }
+}
Modified: workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.browsersim/src/org/jboss/tools/browsersim/ManageDevicesDialog.java
===================================================================
--- workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.browsersim/src/org/jboss/tools/browsersim/ManageDevicesDialog.java 2011-11-04 01:43:51 UTC (rev 36169)
+++ workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.browsersim/src/org/jboss/tools/browsersim/ManageDevicesDialog.java 2011-11-04 10:30:44 UTC (rev 36170)
@@ -10,6 +10,9 @@
******************************************************************************/
package org.jboss.tools.browsersim;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
@@ -20,6 +23,7 @@
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.swt.widgets.TableItem;
/**
* @author Yahor Radtsevich (yradtsevich)
@@ -28,8 +32,6 @@
protected Object result;
protected Shell shell;
-
-
private Table table;
/**
@@ -67,7 +69,7 @@
shell.setSize(450, 300);
shell.setText(getText());
shell.setLayout(new GridLayout(2, false));
-
+
table = new Table(shell, SWT.BORDER | SWT.FULL_SELECTION);
table.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
table.setHeaderVisible(true);
@@ -95,6 +97,16 @@
Button buttonAdd = new Button(compositeControls, SWT.NONE);
buttonAdd.setText("Add");
+ buttonAdd.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ Device newDevice = (Device) new EditDevicesDialog(shell, SWT.APPLICATION_MODAL | SWT.SHELL_TRIM).open();
+ if (newDevice != null) {
+ DevicesManager.getInstance().getDevices().add(newDevice);
+ updateDevices();
+ }
+ }
+ });
Button buttonEdit = new Button(compositeControls, SWT.NONE);
buttonEdit.setText("Edit");
@@ -111,9 +123,25 @@
Button buttonOk = new Button(compositeOkCancel, SWT.NONE);
buttonOk.setText("OK");
+ shell.setDefaultButton(buttonOk);
Button buttonCancel = new Button(compositeOkCancel, SWT.NONE);
buttonCancel.setText("Cancel");
+ buttonCancel.addSelectionListener(new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent e) {
+ shell.close();
+ }
+ });
+
+ updateDevices();
+ updateDevices();
}
-
+
+ public void updateDevices() {
+ table.removeAll();
+ for (Device device : DevicesManager.getInstance().getDevices()) {
+ TableItem tableItem = new TableItem(table, SWT.NONE);
+ tableItem.setText(new String[] {device.getName(), String.valueOf(device.getWidth()), String.valueOf(device.getHeight()), device.getUserAgent()});
+ }
+ }
}
13 years, 1 month
JBoss Tools SVN: r36169 - in trunk/cdi: plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2011-11-03 21:43:51 -0400 (Thu, 03 Nov 2011)
New Revision: 36169
Added:
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/wizard/NewCDIWebProjectWizardTest.java
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.ui/META-INF/MANIFEST.MF
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/CDIProjectWizard.java
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/META-INF/MANIFEST.MF
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/CDIUIAllTests.java
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/wizard/NewCDIWizardTest.java
Log:
https://issues.jboss.org/browse/JBIDE-9581 Create vanilla CDI getting started project
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/META-INF/MANIFEST.MF 2011-11-03 23:31:04 UTC (rev 36168)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/META-INF/MANIFEST.MF 2011-11-04 01:43:51 UTC (rev 36169)
@@ -39,6 +39,10 @@
org.eclipse.jst.servlet.ui;bundle-version="1.1.500",
org.eclipse.wst.web.ui;bundle-version="1.1.400",
org.eclipse.jst.j2ee.ui;bundle-version="1.1.500",
+ org.eclipse.wst.common.project.facet.core;bundle-version="1.4.200",
+ org.eclipse.wst.common.frameworks;bundle-version="1.2.100",
+ org.eclipse.jst.jsf.ui;bundle-version="1.3.2",
+ org.eclipse.jst.jsf.core;bundle-version="1.3.5",
org.eclipse.wst.common.frameworks.ui;bundle-version="1.2.100"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/CDIProjectWizard.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/CDIProjectWizard.java 2011-11-03 23:31:04 UTC (rev 36168)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/CDIProjectWizard.java 2011-11-04 01:43:51 UTC (rev 36169)
@@ -39,6 +39,7 @@
private static final String CDI_TEMPALTE = "template.jboss.tools.cdi10";
private IPreset oldPreset;
+ public static final String ID = "org.jboss.tools.cdi.ui.wizard.NewCDIProjectWizard";
public CDIProjectWizard() {
super();
Modified: trunk/cdi/tests/org.jboss.tools.cdi.ui.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.ui.test/META-INF/MANIFEST.MF 2011-11-03 23:31:04 UTC (rev 36168)
+++ trunk/cdi/tests/org.jboss.tools.cdi.ui.test/META-INF/MANIFEST.MF 2011-11-04 01:43:51 UTC (rev 36169)
@@ -25,12 +25,19 @@
org.eclipse.ui.ide,
org.jboss.tools.jst.jsp.base.test,
org.eclipse.ltk.core.refactoring,
- org.eclipse.search;bundle-version="3.7.0",
- org.jboss.tools.common.el.core;bundle-version="3.3.0",
+ org.eclipse.search,
+ org.jboss.tools.common.el.core,
org.jboss.tools.jst.web.kb,
- org.eclipse.wst.validation;bundle-version="1.2.300",
+ org.eclipse.wst.validation,
org.jboss.tools.jst.web.kb.test,
org.jboss.tools.common.validation,
org.jboss.tools.jst.jsp,
- org.eclipse.ltk.ui.refactoring;bundle-version="3.6.0"
+ org.eclipse.ltk.ui.refactoring,
+ org.eclipse.wst.web.ui,
+ org.eclipse.wst.common.project.facet.core,
+ org.eclipse.wst.common.project.facet.ui,
+ org.eclipse.wst.common.frameworks,
+ org.eclipse.jst.jsf.ui,
+ org.eclipse.jst.jsf.core,
+ org.eclipse.wst.common.frameworks.ui
Export-Package: org.jboss.tools.cdi.ui.test
Modified: trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/CDIUIAllTests.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/CDIUIAllTests.java 2011-11-03 23:31:04 UTC (rev 36168)
+++ trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/CDIUIAllTests.java 2011-11-04 01:43:51 UTC (rev 36169)
@@ -24,6 +24,7 @@
import org.jboss.tools.cdi.ui.test.search.ELReferencesQueryParticipantTest;
import org.jboss.tools.cdi.ui.test.wizard.AddQualifiersToBeanWizardTest;
import org.jboss.tools.cdi.ui.test.wizard.NewCDIClassWizardFactoryTest;
+import org.jboss.tools.cdi.ui.test.wizard.NewCDIWebProjectWizardTest;
import org.jboss.tools.cdi.ui.test.wizard.NewCDIWizardTest;
import org.jboss.tools.cdi.ui.test.wizard.OpenCDINamedBeanDialogTest;
import org.jboss.tools.test.util.ResourcesUtils;
@@ -51,6 +52,7 @@
suiteAll.addTestSuite(NewCDIClassWizardFactoryTest.class);
suiteAll.addTestSuite(CDIPreferencePageTest.class);
suiteAll.addTestSuite(NewCDIWizardTest.class);
+ suiteAll.addTestSuite(NewCDIWebProjectWizardTest.class);
suite.addTestSuite(CAELProposalFilteringTest.class);
suite.addTestSuite(CDISearchParticipantTest.class);
@@ -61,7 +63,7 @@
suiteAll.addTest(new CDICoreTestSetup(suite));
suiteAll.addTestSuite(AddQualifiersToBeanWizardTest.class);
-
+
suiteAll.addTestSuite(CDIRefactoringTest.class);
return suiteAll;
Added: trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/wizard/NewCDIWebProjectWizardTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/wizard/NewCDIWebProjectWizardTest.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/wizard/NewCDIWebProjectWizardTest.java 2011-11-04 01:43:51 UTC (rev 36169)
@@ -0,0 +1,171 @@
+/*******************************************************************************
+ * Copyright (c) 2011 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.cdi.ui.test.wizard;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+import junit.framework.TestCase;
+
+import org.eclipse.jface.wizard.IWizardPage;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.jst.jsf.ui.internal.project.facet.JSFFacetInstallPage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Widget;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.wst.common.componentcore.datamodel.properties.IFacetDataModelProperties;
+import org.eclipse.wst.web.ui.internal.wizards.NewProjectDataModelFacetWizard;
+import org.jboss.tools.cdi.ui.wizard.CDIProjectWizard;
+import org.jboss.tools.test.util.WorkbenchUtils;
+
+/**
+ * @author Alexey Kazakov
+ */
+public class NewCDIWebProjectWizardTest extends TestCase{
+
+ NewProjectDataModelFacetWizard wizard;
+ WizardDialog dialog;
+
+ public NewCDIWebProjectWizardTest() {
+ super("New CDI Web Project tests");
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see junit.framework.TestCase#setUp()
+ */
+ @Override
+ protected void setUp() throws Exception {
+ wizard = (NewProjectDataModelFacetWizard)WorkbenchUtils.findWizardByDefId(CDIProjectWizard.ID);
+ dialog = new WizardDialog(
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
+ wizard);
+ dialog.create();
+ dialog.setBlockOnOpen(false);
+ dialog.open();
+ cleanDefferedEvents();
+ }
+
+ private void cleanDefferedEvents() {
+ while (Display.getCurrent().readAndDispatch());
+ }
+
+ public void testCDIProjectNewWizardInstanceIsCreated() {
+ try {
+ IWizardPage startCDIPrjWzPg = wizard.getStartingPage();
+
+ wizard.getDataModel().setStringProperty("IProjectCreationPropertiesNew.PROJECT_NAME", "testName");
+ assertNotNull("Cannot create start wizard page", startCDIPrjWzPg);
+
+ IWizardPage javaModuleWizPg = wizard.getNextPage(startCDIPrjWzPg);
+ assertNotNull("Cannot create java project wizard page", javaModuleWizPg);
+
+ IWizardPage webModuleWizPg = wizard.getNextPage(javaModuleWizPg);
+ assertNotNull("Cannot create dynamic web project wizard page", webModuleWizPg);
+
+ IWizardPage cdiWizPg = wizard.getNextPage(webModuleWizPg);
+ assertNotNull("Cannot create cdi facet wizard page", cdiWizPg);
+
+ IWizardPage jsfCapabilitiesWizPg = wizard.getNextPage(cdiWizPg);
+ assertNotNull("Cannot create JSF capabilities wizard page", jsfCapabilitiesWizPg);
+ } finally {
+ wizard.performCancel();
+ dialog.close();
+ }
+ }
+
+ public void testCDIProjectNewWizardFinisDisableByDefaul() {
+ try {
+ // Disable Library Configuration
+ disableLibraryConfiguration();
+ cleanDefferedEvents();
+
+ boolean canFinish = wizard.canFinish();
+ assertFalse("Finish button is enabled at first wizard page before all requerd fileds are valid.", canFinish);
+ } finally {
+ wizard.performCancel();
+ dialog.close();
+ }
+ }
+
+ /**
+ * If all fields of all pages are valid then
+ * first page of New CDI Project Wizard must enable Finish button.
+ */
+ public void testCDIProjectNewWizardFinisEnabled() {
+ try {
+ // Disable Library Configuration
+ disableLibraryConfiguration();
+ cleanDefferedEvents();
+
+ // Set project name
+ wizard.getDataModel().setProperty(IFacetDataModelProperties.FACET_PROJECT_NAME, "testSeamProject");
+ cleanDefferedEvents();
+
+ assertTrue("Finish button is disabled at first wizard page in spite of valid project name.", wizard.canFinish());
+ } finally {
+ wizard.performCancel();
+ dialog.close();
+ }
+ }
+
+ private void disableLibraryConfiguration(){
+ for(IWizardPage page : wizard.getPages()){
+ if(page instanceof JSFFacetInstallPage){
+ JSFFacetInstallPage jsfPage = (JSFFacetInstallPage)page;
+ Control control = page.getControl();
+ if(control instanceof Composite){
+ processComposite((Composite)control);
+ }
+ }
+ }
+ }
+
+ private void processComposite(Composite parent){
+ for(Control child : parent.getChildren()){
+ if(child instanceof Combo){
+ Combo combo = (Combo)child;
+
+ int index = -1;
+ for(int i=0; i < combo.getItemCount();i++){
+ String item = combo.getItem(i);
+ if("Disable Library Configuration".equals(item)){
+ index = i;
+ break;
+ }
+ }
+ if(index >= 0){
+ combo.select(index);
+ try{
+ Method method = Widget.class.getDeclaredMethod("sendEvent",new Class[]{int.class});
+ if(method != null){
+ method.setAccessible(true);
+ method.invoke(combo, new Object[]{SWT.Selection});
+ }
+ }catch(NoSuchMethodException ex){
+ ex.printStackTrace();
+ }catch(InvocationTargetException ex){
+ ex.printStackTrace();
+ }catch(IllegalAccessException ex){
+ ex.printStackTrace();
+ }
+ }
+ }
+
+ if(child instanceof Composite)
+ processComposite((Composite)child);
+ }
+ }
+}
\ No newline at end of file
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/wizard/NewCDIWebProjectWizardTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/wizard/NewCDIWizardTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/wizard/NewCDIWizardTest.java 2011-11-03 23:31:04 UTC (rev 36168)
+++ trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/wizard/NewCDIWizardTest.java 2011-11-04 01:43:51 UTC (rev 36169)
@@ -519,5 +519,4 @@
context.close();
}
}
-
}
\ No newline at end of file
13 years, 1 month
JBoss Tools SVN: r36168 - trunk/jst/tests/org.jboss.tools.jst.web.kb.test/src/org/jboss/tools/jst/web/kb/test.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-11-03 19:31:04 -0400 (Thu, 03 Nov 2011)
New Revision: 36168
Modified:
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/src/org/jboss/tools/jst/web/kb/test/WebWithModuleTest.java
Log:
JBIDE-10103
https://issues.jboss.org/browse/JBIDE-10103
Loaded composite components from Java source folders.
Modified: trunk/jst/tests/org.jboss.tools.jst.web.kb.test/src/org/jboss/tools/jst/web/kb/test/WebWithModuleTest.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.web.kb.test/src/org/jboss/tools/jst/web/kb/test/WebWithModuleTest.java 2011-11-03 23:11:02 UTC (rev 36167)
+++ trunk/jst/tests/org.jboss.tools.jst.web.kb.test/src/org/jboss/tools/jst/web/kb/test/WebWithModuleTest.java 2011-11-03 23:31:04 UTC (rev 36168)
@@ -58,7 +58,6 @@
while(kbUtility.getTagLibraries().length == 0 && w++ < 50) {
try {
Thread.sleep(1000);
- System.out.println("waiting for utility");
} catch (InterruptedException e) {
break;
}
13 years, 1 month
JBoss Tools SVN: r36167 - in trunk/cdi/plugins/org.jboss.tools.cdi.ui: src/org/jboss/tools/cdi/ui and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2011-11-03 19:11:02 -0400 (Thu, 03 Nov 2011)
New Revision: 36167
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.ui/META-INF/MANIFEST.MF
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.properties
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/CDIProjectWizard.java
Log:
https://issues.jboss.org/browse/JBIDE-9581 Create vanilla CDI getting started project
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/META-INF/MANIFEST.MF 2011-11-03 22:43:01 UTC (rev 36166)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/META-INF/MANIFEST.MF 2011-11-03 23:11:02 UTC (rev 36167)
@@ -37,7 +37,9 @@
org.eclipse.draw2d;bundle-version="3.7.0",
org.eclipse.jdt.core.manipulation;bundle-version="1.4.0",
org.eclipse.jst.servlet.ui;bundle-version="1.1.500",
- org.eclipse.wst.web.ui;bundle-version="1.1.400"
+ org.eclipse.wst.web.ui;bundle-version="1.1.400",
+ org.eclipse.jst.j2ee.ui;bundle-version="1.1.500",
+ org.eclipse.wst.common.frameworks.ui;bundle-version="1.2.100"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-Vendor: %Bundle-Vendor.0
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.java 2011-11-03 22:43:01 UTC (rev 36166)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.java 2011-11-03 23:11:02 UTC (rev 36167)
@@ -156,4 +156,5 @@
public static String CDI_PROJECT_WIZARD_NEW_PROJECT;
public static String CDI_PROJECT_WIZARD_NEW_PROJECT_TITLE;
public static String CDI_PROJECT_WIZARD_NEW_PROJECT_DESCRIPTION;
+ public static String CDI_PROJECT_WIZARD_PAGE1_CDI_FACET_MUST_BE_SPECIFIED;
}
\ No newline at end of file
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.properties
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.properties 2011-11-03 22:43:01 UTC (rev 36166)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.properties 2011-11-03 23:11:02 UTC (rev 36167)
@@ -143,4 +143,5 @@
CDI_PROJECT_WIZARD_NEW_PROJECT=New CDI Web Project
CDI_PROJECT_WIZARD_NEW_PROJECT_TITLE=CDI Web Project
-CDI_PROJECT_WIZARD_NEW_PROJECT_DESCRIPTION=Create a standalone CDI Web project or add it to a new or existing Enterprise Application.
\ No newline at end of file
+CDI_PROJECT_WIZARD_NEW_PROJECT_DESCRIPTION=Create a standalone CDI Web project or add it to a new or existing Enterprise Application.
+CDI_PROJECT_WIZARD_PAGE1_CDI_FACET_MUST_BE_SPECIFIED=CDI facet must be enabled.
\ No newline at end of file
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/CDIProjectWizard.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/CDIProjectWizard.java 2011-11-03 22:43:01 UTC (rev 36166)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/CDIProjectWizard.java 2011-11-03 23:11:02 UTC (rev 36167)
@@ -17,7 +17,9 @@
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.wizard.IWizardPage;
+import org.eclipse.jst.servlet.ui.project.facet.WebProjectFirstPage;
import org.eclipse.jst.servlet.ui.project.facet.WebProjectWizard;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
import org.eclipse.wst.common.project.facet.core.FacetedProjectFramework;
import org.eclipse.wst.common.project.facet.core.IFacetedProjectTemplate;
import org.eclipse.wst.common.project.facet.core.IFacetedProjectWorkingCopy;
@@ -27,6 +29,7 @@
import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
import org.eclipse.wst.common.project.facet.core.runtime.IRuntime;
import org.jboss.tools.cdi.core.CDIImages;
+import org.jboss.tools.cdi.internal.core.project.facet.ICDIFacetDataModelProperties;
import org.jboss.tools.cdi.ui.CDIUIMessages;
/**
@@ -96,12 +99,7 @@
*/
@Override
protected IWizardPage createFirstPage() {
- IWizardPage page = super.createFirstPage();
-
- page.setTitle(CDIUIMessages.CDI_PROJECT_WIZARD_NEW_PROJECT_TITLE);
- page.setDescription(CDIUIMessages.CDI_PROJECT_WIZARD_NEW_PROJECT_DESCRIPTION);
- page.setImageDescriptor(getDefaultPageImageDescriptor());
-
+ IWizardPage page = new FirstPage(model, "first.page"); //$NON-NLS-1$
return page;
}
@@ -113,4 +111,43 @@
protected ImageDescriptor getDefaultPageImageDescriptor() {
return CDIImages.getImageDescriptor(CDIImages.WELD_WIZARD_IMAGE_PATH);
}
+
+ class FirstPage extends WebProjectFirstPage {
+
+ public FirstPage(IDataModel model, String pageName) {
+ super(model, pageName);
+
+ setTitle(CDIUIMessages.CDI_PROJECT_WIZARD_NEW_PROJECT_TITLE);
+ setDescription(CDIUIMessages.CDI_PROJECT_WIZARD_NEW_PROJECT_DESCRIPTION);
+ setImageDescriptor(CDIProjectWizard.this.getDefaultPageImageDescriptor());
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.wizard.WizardPage#isPageComplete()
+ */
+ @Override
+ public boolean isPageComplete() {
+ boolean pageComplete = super.isPageComplete();
+
+ IProjectFacet pFacet = ProjectFacetsManager.getProjectFacet(ICDIFacetDataModelProperties.CDI_FACET_ID);
+ IFacetedProjectWorkingCopy fProject = getFacetedProjectWorkingCopy();
+ if(fProject!=null) {
+ IProjectFacetVersion cdiFacet = fProject.getProjectFacetVersion(pFacet);
+ if(cdiFacet==null) {
+ if(pageComplete) {
+ this.setErrorMessage(CDIUIMessages.CDI_PROJECT_WIZARD_PAGE1_CDI_FACET_MUST_BE_SPECIFIED);
+ return false;
+ }
+ } else {
+ if(pageComplete) {
+ this.setErrorMessage(null);
+ } else if(CDIUIMessages.CDI_PROJECT_WIZARD_PAGE1_CDI_FACET_MUST_BE_SPECIFIED.equals(getErrorMessage())) {
+ this.setErrorMessage(null);
+ }
+ }
+ }
+ return pageComplete;
+ }
+ }
}
\ No newline at end of file
13 years, 1 month
JBoss Tools SVN: r36166 - in trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui: wizard and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2011-11-03 18:43:01 -0400 (Thu, 03 Nov 2011)
New Revision: 36166
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.properties
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/CDIProjectWizard.java
Log:
https://issues.jboss.org/browse/JBIDE-9581 Create vanilla CDI getting started project
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.java 2011-11-03 22:36:58 UTC (rev 36165)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.java 2011-11-03 22:43:01 UTC (rev 36166)
@@ -19,24 +19,24 @@
static {
NLS.initializeMessages(BUNDLE_NAME, CDIUIMessages.class);
}
-
+
public static String INJECTION_POINT_LABEL_PROVIDER_INJECT_BEAN;
public static String INJECTION_POINT_LABEL_PROVIDER_OBSERVER_METHOD;
public static String INJECTION_POINT_LABEL_PROVIDER_EVENT;
-
+
public static String CDI_BEAN_QUERY_PARTICIPANT_TASK;
public static String CDI_BEAN_QUERY_PARTICIPANT_INJECT_FIELD;
public static String CDI_BEAN_QUERY_PARTICIPANT_INJECT_METHOD;
public static String CDI_BEAN_QUERY_PARTICIPANT_INJECT_PARAMETER;
-
+
public static String CDI_UI_IMAGESBASE_URL_FOR_IMAGE_REGISTRY_CANNOT_BE_NULL;
public static String CDI_UI_IMAGESIMAGE_NAME_CANNOT_BE_NULL;
-
+
public static String CDI_REFACTOR_CONTRIBUTOR_MENU_NAME;
public static String CDI_REFACTOR_CONTRIBUTOR_ERROR;
public static String CDI_REFACTOR_CONTRIBUTOR_RENAME_NAMED_BEAN_ACTION_NAME;
public static String RENAME_NAMED_BEAN_WIZARD_FIELD_NAME;
-
+
public static String NEW_QUALIFIER_WIZARD_TITLE;
public static String NEW_QUALIFIER_WIZARD_PAGE_NAME;
public static String NEW_STEREOTYPE_WIZARD_TITLE;
@@ -45,20 +45,20 @@
public static String NEW_SCOPE_WIZARD_PAGE_NAME;
public static String NEW_INTERCEPTOR_BINDING_WIZARD_TITLE;
public static String NEW_INTERCEPTOR_BINDING_WIZARD_PAGE_NAME;
-
+
public static String NEW_INTERCEPTOR_WIZARD_TITLE;
public static String NEW_INTERCEPTOR_WIZARD_PAGE_NAME;
public static String NEW_INTERCEPTOR_WIZARD_DESCRIPTION;
-
+
public static String NEW_DECORATOR_WIZARD_TITLE;
public static String NEW_DECORATOR_WIZARD_PAGE_NAME;
public static String NEW_DECORATOR_WIZARD_INTERFACES_LABEL;
public static String NEW_DECORATOR_WIZARD_DESCRIPTION;
-
+
public static String NEW_BEAN_WIZARD_TITLE;
public static String NEW_BEAN_WIZARD_PAGE_NAME;
public static String NEW_BEAN_WIZARD_DESCRIPTION;
-
+
public static String NEW_BEANS_XML_WIZARD_TITLE;
public static String NEW_BEANS_XML_WIZARD_PAGE_NAME;
public static String NEW_BEANS_XML_WIZARD_DESCRIPTION;
@@ -76,23 +76,23 @@
public static String FIELD_EDITOR_INTERCEPTOR_BINDINGS_LABEL;
public static String FIELD_EDITOR_STEREOTYPES_LABEL;
public static String FIELD_EDITOR_QUALIFIER_LABEL;
-
+
public static String MESSAGE_METHOD_NAME_EMPTY;
public static String MESSAGE_METHOD_NAME_NOT_VALID;
-
+
public static String MESSAGE_FIELD_NAME_EMPTY;
public static String MESSAGE_FIELD_NAME_NOT_VALID;
-
+
public static String MESSAGE_INTERCEPTOR_BINDINGS_EMPTY;
-
+
public static String MESSAGE_STEREOTYPE_CANNOT_BE_APPLIED_TO_TYPE;
public static String MESSAGE_STEREOTYPE_IS_NOT_COMPATIBLE;
public static String MESSAGE_INTERCEPTOR_BINDING_IS_NOT_COMPATIBLE;
-
+
public static String MESSAGE_QUALIFIER_NOT_SET;
-
+
public static String MESSAGE_BEAN_SHOULD_BE_SERIALIZABLE;
-
+
public static String MAKE_FIELD_STATIC_MARKER_RESOLUTION_TITLE;
public static String MAKE_METHOD_PUBLIC_MARKER_RESOLUTION_TITLE;
public static String MAKE_METHOD_BUSINESS_MARKER_RESOLUTION_TITLE;
@@ -113,7 +113,7 @@
public static String CREATE_STEREOTYPE_TITLE;
public static String CREATE_INTERCEPTOR_TITLE;
public static String CREATE_DECORATOR_TITLE;
-
+
public static String CDI_QUICK_FIXES_ANNOTATION;
public static String CDI_QUICK_FIXES_INTERFACE;
public static String CDI_QUICK_FIXES_CLASS;
@@ -121,14 +121,14 @@
public static String CDI_QUICK_FIXES_METHOD;
public static String CDI_QUICK_FIXES_FIELD;
public static String CDI_QUICK_FIXES_PARAMETER;
-
+
public static String QUESTION;
public static String DECREASING_FIELD_VISIBILITY_MAY_CAUSE_COMPILATION_PROBLEMS;
-
+
public static String SELECT_BEAN_WIZARD_TITLE;
public static String SELECT_BEAN_WIZARD_ENTER_BEAN_NAME;
public static String SELECT_BEAN_WIZARD_SELECT_BEAN;
-
+
public static String ADD_QUALIFIERS_TO_BEAN_WIZARD_TITLE;
public static String ADD_QUALIFIERS_TO_BEAN_WIZARD_AVAILABLE;
public static String ADD_QUALIFIERS_TO_BEAN_WIZARD_IN_BEAN;
@@ -141,17 +141,19 @@
public static String ADD_QUALIFIERS_TO_BEAN_WIZARD_EDIT_QUALIFIER_VALUE;
public static String ADD_QUALIFIERS_TO_BEAN_WIZARD_SET_IS_NOT_UNIQUE;
public static String ADD_QUALIFIERS_TO_BEAN_WIZARD_ENTER_QUALIFIER_NAME;
-
+
public static String CDI_GENERATE_BEANS_XML;
public static String CDI_INSTALL_WIZARD_PAGE_FACET;
public static String CDI_INSTALL_WIZARD_PAGE_CONFIGURE;
-
+
public static String OPEN_CDI_NAMED_BEAN_DIALOG_LOADING;
public static String OPEN_CDI_NAMED_BEAN_DIALOG_NAME;
public static String OPEN_CDI_NAMED_BEAN_DIALOG_WAIT;
-
+
public static String OPEN_CDI_NAMED_BEAN_ACTION_NAME;
public static String OPEN_CDI_NAMED_BEAN_ACTION_MESSAGE;
public static String CDI_PROJECT_WIZARD_NEW_PROJECT;
+ public static String CDI_PROJECT_WIZARD_NEW_PROJECT_TITLE;
+ public static String CDI_PROJECT_WIZARD_NEW_PROJECT_DESCRIPTION;
}
\ No newline at end of file
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.properties
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.properties 2011-11-03 22:36:58 UTC (rev 36165)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.properties 2011-11-03 22:43:01 UTC (rev 36166)
@@ -141,4 +141,6 @@
OPEN_CDI_NAMED_BEAN_ACTION_NAME=Open CDI Named Bean
OPEN_CDI_NAMED_BEAN_ACTION_MESSAGE=Enter bean EL name prefix or pattern (? = any character, * = any string):
-CDI_PROJECT_WIZARD_NEW_PROJECT=New CDI Web Project
\ No newline at end of file
+CDI_PROJECT_WIZARD_NEW_PROJECT=New CDI Web Project
+CDI_PROJECT_WIZARD_NEW_PROJECT_TITLE=CDI Web Project
+CDI_PROJECT_WIZARD_NEW_PROJECT_DESCRIPTION=Create a standalone CDI Web project or add it to a new or existing Enterprise Application.
\ No newline at end of file
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/CDIProjectWizard.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/CDIProjectWizard.java 2011-11-03 22:36:58 UTC (rev 36165)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/CDIProjectWizard.java 2011-11-03 22:43:01 UTC (rev 36166)
@@ -15,6 +15,8 @@
import java.util.Set;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.wizard.IWizardPage;
import org.eclipse.jst.servlet.ui.project.facet.WebProjectWizard;
import org.eclipse.wst.common.project.facet.core.FacetedProjectFramework;
import org.eclipse.wst.common.project.facet.core.IFacetedProjectTemplate;
@@ -24,6 +26,7 @@
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.runtime.IRuntime;
+import org.jboss.tools.cdi.core.CDIImages;
import org.jboss.tools.cdi.ui.CDIUIMessages;
/**
@@ -86,4 +89,28 @@
dm.setSelectedPreset(FacetedProjectFramework.DEFAULT_CONFIGURATION_PRESET_ID);
}
}
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jst.servlet.ui.project.facet.WebProjectWizard#createFirstPage()
+ */
+ @Override
+ protected IWizardPage createFirstPage() {
+ IWizardPage page = super.createFirstPage();
+
+ page.setTitle(CDIUIMessages.CDI_PROJECT_WIZARD_NEW_PROJECT_TITLE);
+ page.setDescription(CDIUIMessages.CDI_PROJECT_WIZARD_NEW_PROJECT_DESCRIPTION);
+ page.setImageDescriptor(getDefaultPageImageDescriptor());
+
+ return page;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jst.servlet.ui.project.facet.WebProjectWizard#getDefaultPageImageDescriptor()
+ */
+ @Override
+ protected ImageDescriptor getDefaultPageImageDescriptor() {
+ return CDIImages.getImageDescriptor(CDIImages.WELD_WIZARD_IMAGE_PATH);
+ }
}
\ No newline at end of file
13 years, 1 month
JBoss Tools SVN: r36165 - in trunk/jst/tests/org.jboss.tools.jst.web.kb.test: projects/utility/src/META-INF/resources and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-11-03 18:36:58 -0400 (Thu, 03 Nov 2011)
New Revision: 36165
Added:
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/utility/src/META-INF/resources/
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/utility/src/META-INF/resources/cc/
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/utility/src/META-INF/resources/cc/inputText.xhtml
Modified:
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/src/org/jboss/tools/jst/web/kb/test/WebWithModuleTest.java
Log:
JBIDE-10103
https://issues.jboss.org/browse/JBIDE-10103
Loaded composite components from Java source folders.
Added: trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/utility/src/META-INF/resources/cc/inputText.xhtml
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/utility/src/META-INF/resources/cc/inputText.xhtml (rev 0)
+++ trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/utility/src/META-INF/resources/cc/inputText.xhtml 2011-11-03 22:36:58 UTC (rev 36165)
@@ -0,0 +1,24 @@
+<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:c="http://java.sun.com/jsp/jstl/core"
+ xmlns:cc="http://java.sun.com/jsf/composite"
+ xmlns:t="http://br.com.test/ui/components">
+
+ <cc:interface componentType="br.com.test.ui.inputtext">
+ <cc:attribute name="label" required="true"/>
+ <cc:attribute name="value" />
+ <cc:attribute name="action" />
+ </cc:interface>
+
+ <cc:implementation>
+ <div class="testinputtext" id="#{cc.clientId}">
+ <h:outputLabel id="label" value="#{cc.attrs.label}: " for="#{cc.clientId}:input" />
+ <h:inputText onkeypress="showUndoButton('#{cc.clientId}:testsoftbutton');" id="input" binding="#{cc.input}" value="#{cc.attrs.value}" />
+ <t:button id="testsoftbutton" alt="lero" styleClass="testbutton" value="undo" action="#{cc.actionUndoValue}" />
+ </div>
+ </cc:implementation>
+</ui:composition>
\ No newline at end of file
Modified: trunk/jst/tests/org.jboss.tools.jst.web.kb.test/src/org/jboss/tools/jst/web/kb/test/WebWithModuleTest.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.web.kb.test/src/org/jboss/tools/jst/web/kb/test/WebWithModuleTest.java 2011-11-03 22:36:10 UTC (rev 36164)
+++ trunk/jst/tests/org.jboss.tools.jst.web.kb.test/src/org/jboss/tools/jst/web/kb/test/WebWithModuleTest.java 2011-11-03 22:36:58 UTC (rev 36165)
@@ -51,9 +51,22 @@
*/
public void testWebProject() throws CoreException {
assertTrue("true".equals(utility.getPersistentProperty(KbProjectFactory.NATURE_MOCK)));
+
+ IKbProject kbUtility = KbProjectFactory.getKbProject(utility, true);
+ assertNotNull(kbUtility);
+ int w = 0;
+ while(kbUtility.getTagLibraries().length == 0 && w++ < 50) {
+ try {
+ Thread.sleep(1000);
+ System.out.println("waiting for utility");
+ } catch (InterruptedException e) {
+ break;
+ }
+ }
IKbProject kb = KbProjectFactory.getKbProject(webapp, true);
ITagLibrary[] ls = kb.getTagLibraries("utility-lib");
assertTrue(ls.length > 0);
}
+
}
13 years, 1 month
JBoss Tools SVN: r36164 - trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-11-03 18:36:10 -0400 (Thu, 03 Nov 2011)
New Revision: 36164
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/KbResourceVisitor.java
Log:
JBIDE-10103
https://issues.jboss.org/browse/JBIDE-10103
Loaded composite components from Java source folders.
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/KbResourceVisitor.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/KbResourceVisitor.java 2011-11-03 22:35:24 UTC (rev 36163)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/KbResourceVisitor.java 2011-11-03 22:36:10 UTC (rev 36164)
@@ -50,20 +50,27 @@
if(p.getProject() != null && p.getProject().isOpen()) {
getJavaSourceRoots(p.getProject());
+ List<IPath> jsf2rs = new ArrayList<IPath>();
XModel model = InnerModelHelper.createXModel(p.getProject());
if(model != null) {
webinfs = ProjectHome.getWebInfPaths(p.getProject());
IPath[] webContents = ProjectHome.getWebContentPaths(p.getProject());
- List<IPath> jsf2rs = new ArrayList<IPath>();
for (IPath webcontent: webContents) {
IPath jsf2r = webcontent.append("resources"); //$NON-NLS-1$
IResource rf = ResourcesPlugin.getWorkspace().getRoot().getFolder(jsf2r);
- if(rf.exists()) {
+ if(rf.exists() && !jsf2rs.contains(jsf2r)) {
jsf2rs.add(jsf2r);
}
}
- jsf2resources = jsf2rs.toArray(new IPath[0]);
}
+ for (IPath s: srcs) {
+ IPath jsf2r = s.append("META-INF/resources"); //$NON-NLS-1$
+ IResource rf = ResourcesPlugin.getWorkspace().getRoot().getFolder(jsf2r);
+ if(rf.exists() && !jsf2rs.contains(jsf2r)) {
+ jsf2rs.add(jsf2r);
+ }
+ }
+ jsf2resources = jsf2rs.toArray(new IPath[0]);
}
}
@@ -104,7 +111,7 @@
break;
}
}
- for (IPath jsf2resource: jsf2resources) {
+ for (IPath jsf2resource: jsf2resources) {int i = 0;
if(jsf2resource.isPrefixOf(f.getFullPath()) && jsf2scanner.isLikelyComponentSource(f)) {
processJSF2Resources(jsf2resource);
break;
13 years, 1 month