JBoss Tools SVN: r38950 - in trunk/jst/plugins/org.jboss.tools.jst.web.ui: templates/Datasource and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2012-02-21 21:11:44 -0500 (Tue, 21 Feb 2012)
New Revision: 38950
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/newfile/NewDSXMLWizard.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/templates/Datasource/datasource-ds-as7.xml
Log:
JBIDE-10787
https://issues.jboss.org/browse/JBIDE-10787
New version of New JBoss Datasource wizard.
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/newfile/NewDSXMLWizard.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/newfile/NewDSXMLWizard.java 2012-02-22 01:27:56 UTC (rev 38949)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/newfile/NewDSXMLWizard.java 2012-02-22 02:11:44 UTC (rev 38950)
@@ -12,9 +12,12 @@
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
+import java.io.BufferedInputStream;
import java.io.File;
+import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
+import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@@ -27,12 +30,20 @@
import org.apache.tools.ant.types.resources.FileResource;
import org.apache.tools.ant.types.resources.StringResource;
import org.apache.tools.ant.util.ResourceUtils;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform;
import org.eclipse.datatools.connectivity.ConnectionProfileException;
import org.eclipse.datatools.connectivity.IConnectionProfile;
@@ -42,10 +53,18 @@
import org.eclipse.datatools.connectivity.drivers.DriverManager;
import org.eclipse.datatools.connectivity.internal.ui.wizards.NewCPWizard;
import org.eclipse.datatools.connectivity.internal.ui.wizards.NewCPWizardCategoryFilter;
+import org.eclipse.jface.dialogs.ErrorDialog;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
import org.eclipse.swt.events.DisposeEvent;
import org.eclipse.swt.events.DisposeListener;
+import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
@@ -54,10 +73,15 @@
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.dialogs.WizardNewFileCreationPage;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.ide.IDE;
+import org.eclipse.ui.ide.undo.CreateFileOperation;
+import org.eclipse.ui.ide.undo.WorkspaceUndoUtil;
import org.eclipse.ui.internal.dialogs.DialogUtil;
import org.eclipse.ui.internal.dialogs.PropertyDialog;
+import org.eclipse.ui.internal.ide.IDEWorkbenchMessages;
+import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin;
+import org.eclipse.ui.internal.ide.IIDEHelpContextIds;
import org.eclipse.ui.internal.wizards.newresource.ResourceMessages;
import org.eclipse.ui.wizards.newresource.BasicNewResourceWizard;
import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelProvider;
@@ -101,9 +125,9 @@
mainPage = new WizardNewDSXMLFileCreationPage("newFilePage1", getSelection()); //$NON-NLS-1$
mainPage.setTitle(Messages.NewDSXMLWizard_TITLE);
mainPage.setDescription(Messages.NewDSXMLWizard_DESCRIPTION);
+
+ mainPage.setFileName("ds.xml"); //$NON-NLS-1$
- mainPage.setFileName("ds.xml");
-
addPage(mainPage);
}
@@ -132,14 +156,73 @@
return true;
}
- class WizardNewDSXMLFileCreationPage extends WizardNewFileCreationPage {
+ static String toDatasourceName(String connectionProfile) {
+ connectionProfile = connectionProfile.trim();
+ StringBuilder result = new StringBuilder();
+ StringBuilder special = new StringBuilder();
+ for (int i = 0; i < connectionProfile.length(); i++) {
+ char c = connectionProfile.charAt(i);
+ if(!Character.isJavaIdentifierPart(c)) {
+ special.append('_');
+ } else {
+ if(special.length() > 0) {
+ result.append(special.toString());
+ special.setLength(0);
+ }
+ result.append(c);
+ }
+ }
+ return result.toString();
+ }
+
+ IContainer getInitialContainer() {
+ ISelection s = getSelection();
+ if(s instanceof IStructuredSelection) {
+ Object o = ((IStructuredSelection)s).getFirstElement();
+ IResource r = null;
+ if(o instanceof IResource) {
+ r = (IResource) o;
+ } else if(o instanceof IAdaptable) {
+ r = (IResource)((IAdaptable)o).getAdapter(IResource.class);
+ }
+ if(r instanceof IFile) {
+ return r.getParent();
+ } else if(r instanceof IContainer) {
+ return (IContainer)r;
+ }
+ }
+ return null;
+
+ }
+
+ class WizardNewDSXMLFileCreationPage extends WizardPage {
private IFieldEditor connProfileSelEditor;
private IFieldEditor templateSelEditor;
+ private IFieldEditor folderEditor;
+ private String initialFileName = "";
+ private IFieldEditor fileNameEditor;
+ IDataModel model;
+
+
public WizardNewDSXMLFileCreationPage(String pageName, IStructuredSelection selection) {
- super(pageName, selection);
+ super(pageName);
+ setPageComplete(false);
}
-
+
+ public IPath getContainerFullPath() {
+ String path = folderEditor.getValueAsString();
+ return new Path(path).makeAbsolute();
+ }
+
+ public void setFileName(String value) {
+ if(fileNameEditor == null) {
+ initialFileName = value;
+ } else {
+ fileNameEditor.setValue(value);
+ }
+ }
+
protected InputStream getInitialContents() {
String connection = connProfileSelEditor.getValueAsString();
String templateName = templateSelEditor.getValueAsString();
@@ -147,10 +230,12 @@
try {
// 1. Find template. For Seam project it is done by its runtime.
IPath containerPath = getContainerFullPath();
- IProject currentProject = ResourcesPlugin.getWorkspace().getRoot().getFolder(containerPath).getProject();
+ IProject currentProject = containerPath.segmentCount() == 1
+ ? ResourcesPlugin.getWorkspace().getRoot().getProject(containerPath.segment(0))
+ : ResourcesPlugin.getWorkspace().getRoot().getFolder(containerPath).getProject();
File homePath = DSDataModelProvider.getTemplatesFolder();
- String templatePath = (NewDSXMLWizardFactory.TEMPLATE_LIST[1].equals(templateName))
+ String templatePath = (NewDSXMLWizardFactory.AS_7_TEMPLATE.equals(templateName))
? "/Datasource/datasource-ds-as7.xml" //$NON-NLS-1$
: "/Datasource/datasource-ds-default.xml"; //$NON-NLS-1$
File dataSourceDsFile = new File(homePath, templatePath);
@@ -159,9 +244,10 @@
FilterSetCollection viewFilterSetCollection = new FilterSetCollection();
// Do it by reusing data model provider.
- IDataModel model = DataModelFactory.createDataModel(new DSDataModelProvider());
+ model = DataModelFactory.createDataModel(new DSDataModelProvider());
model.setProperty(IDSDataModelProperties.PROJECT_NAME, currentProject.getName());
model.setProperty(IDSDataModelProperties.CONNECTION_PROFILE, connection);
+ model.setProperty(IDSDataModelProperties.JDBC_CONNECTION_NAME, toDatasourceName(connection));
IConnectionProfile connProfile = ProfileManager.getInstance().getProfileByName(connection.toString());
if(connProfile == null) {
return null;
@@ -187,12 +273,61 @@
}
}
+ IFile getJarTarget() {
+ if(!NewDSXMLWizardFactory.AS_7_TEMPLATE.equals(templateSelEditor.getValueAsString())) {
+ return null;
+ }
+ String jarname = (String)model.getProperty(IDSDataModelProperties.JDBC_DRIVER_JAR_NAME);
+ if(jarname != null) {
+ IPath container = getContainerFullPath();
+ IPath target = container.append(jarname + ".jar"); //$NON-NLS-1$
+ IFile targetFile = ResourcesPlugin.getWorkspace().getRoot().getFile(target);
+ if(!targetFile.exists()) {
+ return targetFile;
+ }
+ }
+ return null;
+ }
+
+ InputStream getJarContents() {
+ String[] jars = (String[])model.getProperty(IDSDataModelProperties.JDBC_DRIVER_JAR_PATH);
+ String jarname = (String)model.getProperty(IDSDataModelProperties.JDBC_DRIVER_JAR_NAME);
+ if(jars != null && jarname != null) {
+ File jarSource = new File(jars[0]);
+ if(jarSource.isFile()) {
+ IPath container = getContainerFullPath();
+ IPath target = container.append(jarname + ".jar"); //$NON-NLS-1$
+ IFile targetFile = ResourcesPlugin.getWorkspace().getRoot().getFile(target);
+ if(!targetFile.exists()) {
+ try {
+ return new BufferedInputStream(new FileInputStream(jarSource));
+ } catch (IOException e) {
+ WebUiPlugin.getDefault().logError(e);
+ }
+ }
+ }
+ }
+ return null;
+ }
+
+ CreateFileOperation getJarFileOperation(IFile targetFile, InputStream jarContents) {
+ return new CreateFileOperation(targetFile, null, jarContents, "Copy driver jar file.");
+ }
+
public void createControl(Composite parent) {
- super.createControl(parent);
- Composite topLevel = (Composite)getControl();
+ initializeDialogUnits(parent);
+ // top level group
+ Composite topLevel = new Composite(parent, SWT.NONE);
+ topLevel.setLayout(new GridLayout());
+ topLevel.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_FILL
+ | GridData.HORIZONTAL_ALIGN_FILL));
+ topLevel.setFont(parent.getFont());
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(topLevel,
+ IIDEHelpContextIds.NEW_FILE_WIZARD_PAGE);
+
connProfileSelEditor = NewDSXMLWizardFactory.createConnectionProfileSelectionFieldEditor(getConnectionProfileDefaultValue(), new IValidator() {
public Map<String, IStatus> validate(Object value, Object context) {
- validatePage();
+ setPageComplete(validatePage());
return ValidatorFactory.NO_ERRORS;
}
}, false);
@@ -204,24 +339,150 @@
templateSelEditor.doFillIntoGrid(q);
connProfileSelEditor.addPropertyChangeListener(new PropertyChangeListener() {
public void propertyChange(PropertyChangeEvent evt) {
- validatePage();
+ String prefix = toDatasourceName(connProfileSelEditor.getValueAsString());
+ setFileName(prefix + "-ds.xml"); //$NON-NLS-1$
+ setPageComplete(validatePage());
}
});
- validatePage();
+
+ String defaultFolder = "";
+ IContainer c = getInitialContainer();
+ if(c != null) {
+ defaultFolder = c.getFullPath().toString();
+ }
+ folderEditor = IFieldEditorFactory.INSTANCE.createBrowseWorkspaceFolderEditor("folder", "Parent fold&er:", defaultFolder);
+ folderEditor.addPropertyChangeListener(new PropertyChangeListener() {
+ public void propertyChange(PropertyChangeEvent evt) {
+ setPageComplete(validatePage());
+ }
+ });
+ folderEditor.doFillIntoGrid(q);
+
+ String prefix = toDatasourceName(mainPage.connProfileSelEditor.getValueAsString());
+ String defaultFileName = prefix + "-ds.xml"; //$NON-NLS-1$
+
+ fileNameEditor = IFieldEditorFactory.INSTANCE.createTextEditor("name", "File na&me:", defaultFileName);
+ fileNameEditor.doFillIntoGrid(q);
+ fileNameEditor.addPropertyChangeListener(new PropertyChangeListener() {
+ public void propertyChange(PropertyChangeEvent evt) {
+ setPageComplete(validatePage());
+ }
+ });
+
+ setControl(topLevel);
+ setPageComplete(validatePage());
}
protected boolean validatePage() {
- boolean valid = super.validatePage();
- if(valid && connProfileSelEditor != null) {
+ IPath path = getContainerFullPath();
+ String fileName = fileNameEditor.getValueAsString();
+ IWorkspace workspace = ResourcesPlugin.getWorkspace();
+
+ IStatus result = workspace.validateName(fileName, IResource.FILE);
+ if (!result.isOK()) {
+ setErrorMessage(result.getMessage());
+ return false;
+ }
+ for (int i = 0; i < path.segmentCount(); i++) {
+ String s = path.segment(i);
+ result = workspace.validateName(s, IResource.FOLDER);
+ if (!result.isOK()) {
+ setErrorMessage(result.getMessage());
+ return false;
+ }
+ }
+ IPath filePath = path.append(fileName);
+ if(workspace.getRoot().getFile(filePath).exists()) {
+ setErrorMessage("'" + fileName + "'" + " already exists.");
+ return false;
+ }
+
+ if(connProfileSelEditor != null) {
String p = connProfileSelEditor.getValueAsString();
if(p == null || p.length() == 0) {
- valid = false;
setErrorMessage("Connenction profile must be set.");
+ return false;
}
}
- return valid;
+ setErrorMessage(null);
+ return true;
}
+
+ IFile newFile = null;
+ protected IFile createFileHandle(IPath filePath) {
+ return IDEWorkbenchPlugin.getPluginWorkspace().getRoot().getFile(
+ filePath);
+ }
+ public IFile createNewFile() {
+ if (newFile != null) {
+ return newFile;
+ }
+
+ // create the new file and cache it if successful
+
+ final IPath containerPath = getContainerFullPath();
+ IPath newFilePath = containerPath.append(fileNameEditor.getValueAsString());
+ final IFile newFileHandle = createFileHandle(newFilePath);
+ final InputStream initialContents = getInitialContents();
+
+ final IFile jarTarget = getJarTarget();
+ final InputStream jarContents = jarTarget == null ? null : getJarContents();
+
+ IRunnableWithProgress op = new IRunnableWithProgress() {
+ public void run(IProgressMonitor monitor) {
+ CreateFileOperation op = new CreateFileOperation(newFileHandle,
+ null, initialContents, IDEWorkbenchMessages.WizardNewFileCreationPage_title);
+ try {
+ op.execute(monitor, WorkspaceUndoUtil.getUIInfoAdapter(getShell()));
+ if(jarContents != null) {
+ CreateFileOperation jar = getJarFileOperation(jarTarget, jarContents);
+ jar.execute(monitor, WorkspaceUndoUtil.getUIInfoAdapter(getShell()));
+ }
+ } catch (final ExecutionException e) {
+ getContainer().getShell().getDisplay().syncExec(
+ new Runnable() {
+ public void run() {
+ if (e.getCause() instanceof CoreException) {
+ ErrorDialog.openError(getContainer().getShell(), // Was
+ // Utilities.getFocusShell()
+ IDEWorkbenchMessages.WizardNewFileCreationPage_errorTitle,
+ null, // no special
+ // message
+ ((CoreException) e.getCause()).getStatus());
+ } else {
+ IDEWorkbenchPlugin.log(getClass(), "createNewFile()", e.getCause()); //$NON-NLS-1$
+ MessageDialog.openError(getContainer().getShell(),
+ IDEWorkbenchMessages.WizardNewFileCreationPage_internalErrorTitle,
+ NLS.bind(IDEWorkbenchMessages.WizardNewFileCreationPage_internalErrorMessage,
+ e.getCause().getMessage()));
+ }
+ }
+ });
+ }
+ }
+ };
+ try {
+ getContainer().run(true, true, op);
+ } catch (InterruptedException e) {
+ return null;
+ } catch (InvocationTargetException e) {
+ // Execution Exceptions are handled above but we may still get
+ // unexpected runtime errors.
+ IDEWorkbenchPlugin.log(getClass(),
+ "createNewFile()", e.getTargetException()); //$NON-NLS-1$
+ MessageDialog.open(MessageDialog.ERROR,
+ getContainer().getShell(),
+ IDEWorkbenchMessages.WizardNewFileCreationPage_internalErrorTitle,
+ NLS.bind(IDEWorkbenchMessages.WizardNewFileCreationPage_internalErrorMessage,
+ e.getTargetException().getMessage()), SWT.SHEET);
+ return null;
+ }
+ newFile = newFileHandle;
+ return newFile;
+ }
+
+
}
/**
@@ -287,6 +548,9 @@
*/
String JDBC_DRIVER_JAR_PATH = "driver.file"; //$NON-NLS-1$
String DATATOOLS_JDBC_DRIVER_JAR_PATH = "org.eclipse.datatools.connectivity.driverDefinitionID"; //$NON-NLS-1$
+
+ String JDBC_CONNECTION_NAME = "datasource.name"; //$NON-NLS-1$
+ String JDBC_DRIVER_JAR_NAME = "driver.jar.name.without.dot.jar"; //$NON-NLS-1$
}
class DSDataModelProvider extends AbstractDataModelProvider implements IDSDataModelProperties {
@@ -320,6 +584,8 @@
// names.add(RECREATE_TABLES_AND_DATA_ON_DEPLOY);
names.add(JDBC_DRIVER_JAR_PATH);
+ names.add(JDBC_CONNECTION_NAME);
+ names.add(JDBC_DRIVER_JAR_NAME);
return names;
}
@@ -406,6 +672,15 @@
.getDriverInstanceByID(
props.get(DATATOOLS_JDBC_DRIVER_JAR_PATH).toString()).getJarListAsArray());
}
+
+ String jarList = props.getProperty("jarList"); //$NON-NLS-1$
+ int q = jarList.indexOf(".jar"); //$NON-NLS-1$
+ if(q >= 0) {
+ String jar = jarList.substring(0, q);
+ int b = jar.replace('\\', '/').lastIndexOf('/');
+ String jarName = jar.substring(b + 1);
+ model.setProperty(JDBC_DRIVER_JAR_NAME, jarName);
+ }
}
}
@@ -427,9 +702,12 @@
class NewDSXMLWizardFactory {
static String EMPTY_PROFILE = " "; //$NON-NLS-1$
-
+
+ static String AS_5_TEMPLATE = "Format: JBoss AS 5"; //$NON-NLS-1$
+ static String AS_7_TEMPLATE = "Format: JBoss AS 7"; //$NON-NLS-1$
+
public static String[] TEMPLATE_LIST = {
- "Format: JBoss AS 5", "Format: JBoss AS 7" //$NON-NLS-1$ //$NON-NLS-2$
+ AS_5_TEMPLATE, AS_7_TEMPLATE
};
public static IFieldEditor createTemplateFieldEditor(Object defaultValue) {
@@ -684,6 +962,8 @@
JDBC_TEMPLATE.addFilter("password","${hibernate.connection.password}"); //$NON-NLS-1$ //$NON-NLS-2$
JDBC_TEMPLATE.addFilter("catalogProperty","${catalog.property}"); //$NON-NLS-1$ //$NON-NLS-2$
JDBC_TEMPLATE.addFilter("schemaProperty","${schema.property}"); //$NON-NLS-1$ //$NON-NLS-2$
+ JDBC_TEMPLATE.addFilter("datasourcename","${datasource.name}"); //$NON-NLS-1$ //$NON-NLS-2$
+ JDBC_TEMPLATE.addFilter("driverjarnamewithoutdotjar","${driver.jar.name.without.dot.jar}"); //$NON-NLS-1$ //$NON-NLS-2$
PROJECT_TEMPLATE = new FilterSet();
PROJECT_TEMPLATE.addFilter("projectName","${project.name}"); //$NON-NLS-1$ //$NON-NLS-2$
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/templates/Datasource/datasource-ds-as7.xml
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/templates/Datasource/datasource-ds-as7.xml 2012-02-22 01:27:56 UTC (rev 38949)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/templates/Datasource/datasource-ds-as7.xml 2012-02-22 02:11:44 UTC (rev 38950)
@@ -1,12 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<datasources xmlns="http://www.jboss.org/ironjacamar/schema">
- <xa-datasource jndi-name="java:/JPADS" pool-name="JPADS">
- <xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
- <xa-datasource-property name="URL">jdbc:h2:mem:test</xa-datasource-property>
- <driver>h2</driver>
+ <datasource jndi-name="java:jboss/datasources/@datasourcename@" enabled="true"
+ use-java-context="true" pool-name="@datasourcename@">
+ <connection-url>@jdbcUrl@</connection-url>
+ <driver>@driverjarnamewithoutdotjar@</driver>
+ <pool></pool>
<security>
- <user-name>@username@</user-name>
- <password>@password@</password>
- </security>
- </xa-datasource>
+ <user-name>@username@</user-name>
+ <password>@password@</password>
+ </security>
+ </datasource>
</datasources>
14 years, 1 month
JBoss Tools SVN: r38949 - branches/jbosstools-3.3.0.Beta1/jsf/features/org.jboss.tools.jsf.feature.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2012-02-21 20:27:56 -0500 (Tue, 21 Feb 2012)
New Revision: 38949
Modified:
branches/jbosstools-3.3.0.Beta1/jsf/features/org.jboss.tools.jsf.feature/feature.xml
Log:
https://issues.jboss.org/browse/JBIDE-10972 JSF tooling is not properly installed to Eclipse for Java Developers
added org.eclipse.wst.web_ui.feature to feature requirements
Modified: branches/jbosstools-3.3.0.Beta1/jsf/features/org.jboss.tools.jsf.feature/feature.xml
===================================================================
--- branches/jbosstools-3.3.0.Beta1/jsf/features/org.jboss.tools.jsf.feature/feature.xml 2012-02-22 01:26:23 UTC (rev 38948)
+++ branches/jbosstools-3.3.0.Beta1/jsf/features/org.jboss.tools.jsf.feature/feature.xml 2012-02-22 01:27:56 UTC (rev 38949)
@@ -22,6 +22,7 @@
<import feature="org.jboss.tools.common.feature" version="3.3.0" match="greaterOrEqual"/>
<import feature="org.jboss.tools.jst.feature" version="3.3.0" match="greaterOrEqual"/>
<import feature="org.jboss.tools.vpe.feature" version="3.3.0" match="greaterOrEqual"/>
+ <import feature="org.eclipse.wst.web_ui.feature" version="3.3.2" match="greaterOrEqual"/>
</requires>
<plugin
14 years, 1 month
JBoss Tools SVN: r38948 - trunk/jsf/features/org.jboss.tools.jsf.feature.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2012-02-21 20:26:23 -0500 (Tue, 21 Feb 2012)
New Revision: 38948
Modified:
trunk/jsf/features/org.jboss.tools.jsf.feature/feature.xml
Log:
https://issues.jboss.org/browse/JBIDE-10972 JSF tooling is not properly installed to Eclipse for Java Developers
added org.eclipse.wst.web_ui.feature to feature requirements
Modified: trunk/jsf/features/org.jboss.tools.jsf.feature/feature.xml
===================================================================
--- trunk/jsf/features/org.jboss.tools.jsf.feature/feature.xml 2012-02-21 20:39:35 UTC (rev 38947)
+++ trunk/jsf/features/org.jboss.tools.jsf.feature/feature.xml 2012-02-22 01:26:23 UTC (rev 38948)
@@ -22,6 +22,7 @@
<import feature="org.jboss.tools.common.feature" version="3.3.0" match="greaterOrEqual"/>
<import feature="org.jboss.tools.jst.feature" version="3.3.0" match="greaterOrEqual"/>
<import feature="org.jboss.tools.vpe.feature" version="3.3.0" match="greaterOrEqual"/>
+ <import feature="org.eclipse.wst.web_ui.feature" version="3.3.2" match="greaterOrEqual"/>
</requires>
<plugin
14 years, 1 month
JBoss Tools SVN: r38947 - trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-02-21 15:39:35 -0500 (Tue, 21 Feb 2012)
New Revision: 38947
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/CreateOrEditDomainAction.java
Log:
added class header and author
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/CreateOrEditDomainAction.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/CreateOrEditDomainAction.java 2012-02-21 20:36:40 UTC (rev 38946)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/CreateOrEditDomainAction.java 2012-02-21 20:39:35 UTC (rev 38947)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * 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.openshift.express.internal.ui.action;
import org.eclipse.jface.viewers.ITreeSelection;
@@ -13,6 +23,9 @@
import com.openshift.express.client.IUser;
import com.openshift.express.client.OpenShiftException;
+/**
+ * @author Xavier Coulon
+ */
public class CreateOrEditDomainAction extends AbstractAction {
public CreateOrEditDomainAction() {
14 years, 1 month
JBoss Tools SVN: r38946 - trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-02-21 15:36:40 -0500 (Tue, 21 Feb 2012)
New Revision: 38946
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/EditDomainDialog.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewDomainDialog.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OpenShiftExpressApplicationWizard.java
Log:
[JBIDE-10484] reporting details if edit/create domain & create app & embed cartridges fail
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/EditDomainDialog.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/EditDomainDialog.java 2012-02-21 20:30:43 UTC (rev 38945)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/EditDomainDialog.java 2012-02-21 20:36:40 UTC (rev 38946)
@@ -15,10 +15,12 @@
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.osgi.util.NLS;
import org.jboss.tools.common.ui.WizardUtils;
import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
import com.openshift.express.client.IUser;
+import com.openshift.express.client.OpenShiftEndpointException;
/**
* @author Andre Dietisheim
@@ -47,8 +49,12 @@
try {
model.renameDomain();
return Status.OK_STATUS;
+ } catch(OpenShiftEndpointException e) {
+ return OpenShiftUIActivator.createErrorStatus(NLS.bind(
+ "Could not create domain \"{0}\": {1}", model.getNamespace(), e.getResponseResult()), e);
} catch (Exception e) {
- return new Status(IStatus.ERROR, OpenShiftUIActivator.PLUGIN_ID, "Could not rename domain", e);
+ return OpenShiftUIActivator.createErrorStatus(NLS.bind(
+ "Could not rename domain {0}", model.getNamespace()), e);
}
}
}, getContainer());
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewDomainDialog.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewDomainDialog.java 2012-02-21 20:30:43 UTC (rev 38945)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewDomainDialog.java 2012-02-21 20:36:40 UTC (rev 38946)
@@ -20,6 +20,7 @@
import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
import com.openshift.express.client.IUser;
+import com.openshift.express.client.OpenShiftEndpointException;
/**
* @author André Dietisheim
@@ -41,9 +42,12 @@
protected IStatus run(IProgressMonitor monitor) {
try {
model.createDomain();
+ } catch (OpenShiftEndpointException e) {
+ return OpenShiftUIActivator.createErrorStatus(NLS.bind(
+ "Could not create domain \"{0}\": {1}", model.getNamespace(), e.getResponseResult()), e);
} catch (Exception e) {
- return new Status(IStatus.ERROR, OpenShiftUIActivator.PLUGIN_ID,
- NLS.bind("Could not create domain \"{0}\"", model.getNamespace()), e);
+ return OpenShiftUIActivator.createErrorStatus(NLS.bind(
+ "Could not create domain \"{0}\"", model.getNamespace()), e);
}
return Status.OK_STATUS;
}
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OpenShiftExpressApplicationWizard.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OpenShiftExpressApplicationWizard.java 2012-02-21 20:30:43 UTC (rev 38945)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OpenShiftExpressApplicationWizard.java 2012-02-21 20:36:40 UTC (rev 38946)
@@ -45,6 +45,7 @@
import com.openshift.express.client.IApplication;
import com.openshift.express.client.IEmbeddableCartridge;
import com.openshift.express.client.IUser;
+import com.openshift.express.client.OpenShiftEndpointException;
import com.openshift.express.client.OpenShiftException;
/**
@@ -193,8 +194,12 @@
try {
getWizardModel().createApplication(monitor);
return Status.OK_STATUS;
- } catch (Exception e) {
+ } catch (OpenShiftEndpointException e) {
// TODO: refresh user
+ return OpenShiftUIActivator.createErrorStatus("Could not create application \"{0}\": {1}",
+ e, applicationName, e.getResponseResult());
+ } catch (OpenShiftException e) {
+ // TODO: refresh user
return OpenShiftUIActivator.createErrorStatus("Could not create application \"{0}\"",
e, applicationName);
}
@@ -210,9 +215,9 @@
private boolean addRemoveCartridges(final IApplication application,
final Set<IEmbeddableCartridge> selectedCartridges) {
try {
+ final String applicationName = getWizardModel().getApplication().getName();
IStatus status = WizardUtils.runInWizard(
- new Job(NLS.bind("Adding selected embedded cartridges for application {0}...", getWizardModel()
- .getApplication().getName())) {
+ new Job(NLS.bind("Adding selected embedded cartridges for application {0}...", applicationName)) {
@Override
protected IStatus run(IProgressMonitor monitor) {
@@ -222,6 +227,10 @@
embeddableCartridges.addAll(selectedCartridges);
application.addEmbbedCartridges(embeddableCartridges);
}
+ } catch (OpenShiftEndpointException e) {
+ // TODO: refresh user
+ return OpenShiftUIActivator.createErrorStatus(NLS.bind(
+ "Could not embed cartridges to application {0}: {1}", applicationName, e.getResponseResult()));
} catch (OpenShiftException e) {
return OpenShiftUIActivator.createErrorStatus(NLS.bind(
"Could not embed cartridges to application {0}", getWizardModel()
14 years, 1 month
JBoss Tools SVN: r38945 - trunk/requirements/jboss-riftsaw-2.3.0.Final.
by jbosstools-commits@lists.jboss.org
Author: psrna
Date: 2012-02-21 15:30:43 -0500 (Tue, 21 Feb 2012)
New Revision: 38945
Modified:
trunk/requirements/jboss-riftsaw-2.3.0.Final/buildRequirement.xml
Log:
* updated riftsaw requirement, added jboss-as-6
Modified: trunk/requirements/jboss-riftsaw-2.3.0.Final/buildRequirement.xml
===================================================================
--- trunk/requirements/jboss-riftsaw-2.3.0.Final/buildRequirement.xml 2012-02-21 19:48:43 UTC (rev 38944)
+++ trunk/requirements/jboss-riftsaw-2.3.0.Final/buildRequirement.xml 2012-02-21 20:30:43 UTC (rev 38945)
@@ -29,21 +29,21 @@
</target>
<target name="install-jbossas" >
<property file="../jbossas/build.properties" />
- <unzip src="${requirement.build.root}/../download/jbossas/${jboss51.build.archive}" dest="${unzip.dest}" >
- <mapper type="glob" from="${jboss51.build.name}/*" to="${jboss51.build.name}-riftsaw-2.3.0.Final/*"/>
+ <unzip src="${requirement.build.root}/../download/jbossas/${jboss60.build.archive}" dest="${unzip.dest}" >
+ <mapper type="glob" from="jboss-6.0.0.Final/*" to="${jboss60.build.name}-riftsaw-2.3.0.Final/*"/>
</unzip>
</target>
<target name="install-jbossesb" >
<property file="../jbossesb-4.10/build.properties" prefix="jbossesb-4.10" />
<ant dir="${unzip.dest}/${jbossesb-4.10.build.archive.root}/install" target="deploy">
- <property name="org.jboss.esb.server.home" value="${unzip.dest}/${jboss51.build.name}-riftsaw-2.3.0.Final" />
+ <property name="org.jboss.esb.server.home" value="${unzip.dest}/${jboss60.build.name}-riftsaw-2.3.0.Final" />
<property name="org.jboss.esb.server.config" value="default" />
</ant>
</target>
<target name="install-riftsaw" >
<property file="../riftsaw-2.3.0.Final/build.properties" prefix="riftsaw-2.3.0.Final" />
<ant dir="${unzip.dest}/${riftsaw-2.3.0.Final.build.archive.root}/install" target="deploy">
- <property name="org.jboss.as.home" value="${unzip.dest}/${jboss51.build.name}-riftsaw-2.3.0.Final" />
+ <property name="org.jboss.as.home" value="${unzip.dest}/${jboss60.build.name}-riftsaw-2.3.0.Final" />
<property name="org.jboss.as.config" value="default" />
<property name="org.jboss.esb.home" value="${unzip.dest}/${jbossesb.build.archive.root}" />
<property name="databasev" value="hsql" />
14 years, 1 month
JBoss Tools SVN: r38944 - trunk/openshift/plugins/org.jboss.tools.openshift.express.client.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-02-21 14:48:43 -0500 (Tue, 21 Feb 2012)
New Revision: 38944
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.client/openshift-java-client-1.1.1-SNAPSHOT.jar
Log:
[JBIDE-10484] added latest client jar that reports error details in OpenShiftEndpointException
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.client/openshift-java-client-1.1.1-SNAPSHOT.jar
===================================================================
(Binary files differ)
14 years, 1 month
JBoss Tools SVN: r38943 - trunk/common/plugins/org.jboss.tools.common.ui.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2012-02-21 13:13:24 -0500 (Tue, 21 Feb 2012)
New Revision: 38943
Modified:
trunk/common/plugins/org.jboss.tools.common.ui/plugin.xml
Log:
https://issues.jboss.org/browse/JBIDE-10212 JBoss Perspective: File-New Options
Dynamic Web Project shortcut added to complete the list
Modified: trunk/common/plugins/org.jboss.tools.common.ui/plugin.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/plugin.xml 2012-02-21 18:06:37 UTC (rev 38942)
+++ trunk/common/plugins/org.jboss.tools.common.ui/plugin.xml 2012-02-21 18:13:24 UTC (rev 38943)
@@ -74,4 +74,13 @@
<markerResolutionGenerator
class="org.jboss.tools.common.ui.marker.ConfigureProblemSeverityResolutionGenerator"/>
</extension>
+ <extension
+ point="org.eclipse.ui.perspectiveExtensions">
+ <perspectiveExtension
+ targetID="org.jboss.tools.common.ui.JBossPerspective">
+ <newWizardShortcut
+ id="org.eclipse.jst.servlet.ui.project.facet.WebProjectWizard">
+ </newWizardShortcut>
+ </perspectiveExtension>
+ </extension>
</plugin>
14 years, 1 month
JBoss Tools SVN: r38942 - in trunk/documentation/whatsnew/vpe: images/3.3.0.Beta1 and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2012-02-21 13:06:37 -0500 (Tue, 21 Feb 2012)
New Revision: 38942
Added:
trunk/documentation/whatsnew/vpe/images/3.3.0.Beta1/10431-browsersim-skin.png
trunk/documentation/whatsnew/vpe/images/3.3.0.Beta1/10553-browsersim-default-page.png
Modified:
trunk/documentation/whatsnew/vpe/vpe-news-3.3.0.Beta1.html
Log:
https://issues.jboss.org/browse/JBIDE-10963 : Visual Editor Component N&N for 3.3.0.Beta1
Added: trunk/documentation/whatsnew/vpe/images/3.3.0.Beta1/10431-browsersim-skin.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/whatsnew/vpe/images/3.3.0.Beta1/10431-browsersim-skin.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/whatsnew/vpe/images/3.3.0.Beta1/10553-browsersim-default-page.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/whatsnew/vpe/images/3.3.0.Beta1/10553-browsersim-default-page.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: trunk/documentation/whatsnew/vpe/vpe-news-3.3.0.Beta1.html
===================================================================
--- trunk/documentation/whatsnew/vpe/vpe-news-3.3.0.Beta1.html 2012-02-21 18:04:49 UTC (rev 38941)
+++ trunk/documentation/whatsnew/vpe/vpe-news-3.3.0.Beta1.html 2012-02-21 18:06:37 UTC (rev 38942)
@@ -39,12 +39,12 @@
<tr>
<td valign="top" align="left">
<b><p>
- browsersim should be sexy
+ New look of BrowserSim
<p></b>
</td>
<td valign="top">
- <p>BrowserSim is...</p>
- <p><img src="images/3.3.0.Beta1/.png"
+ <p>Now <a href="vpe-news-3.3.0.M5.html">BrowserSim</a> supports predefined skins.</p>
+ <p><img src="images/3.3.0.Beta1/10431-browsersim-skin.png"
alt=""
title=""/></p>
<p><small>
@@ -63,14 +63,15 @@
<tr>
<td valign="top" align="left">
<b><p>
- BrowserSim launch via toolbar
+ Intelligent start page in BrowserSim
<p></b>
</td>
<td valign="top">
<p>
- BrowserSim launch via toolbar/command should guess which url based on current selection/editor.
+ Now <a href="vpe-news-3.3.0.M5.html">BrowserSim</a> tries to guess which page should be opened initially. For example,
+ it will automatically view a page which is opened in Internal Browser.
</p>
- <p><img src="../images/.png"/></p>
+ <p><img src="images/3.3.0.Beta1/10553-browsersim-default-page.png"/></p>
<p><small>
<a href="https://jira.jboss.org/jira/browse/JBIDE-10553">Related Jira</a>
</small></p>
@@ -87,7 +88,7 @@
<tr>
<td valign="top" align="left">
<b><p>
- Visual/Source page editors row lock was added.
+ Visual/Source page editors row lock
<p></b>
</td>
<td valign="top">
@@ -104,7 +105,7 @@
<tr>
<td valign="top" align="left">
<b><p>
- Support of CSS @import expressions was added.
+ Support of CSS @import expressions
<p></b>
</td>
<td valign="top">
14 years, 1 month
JBoss Tools SVN: r38941 - branches/jbosstools-3.3.0.Beta1/central/plugins/org.jboss.tools.central.discovery.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2012-02-21 13:04:49 -0500 (Tue, 21 Feb 2012)
New Revision: 38941
Modified:
branches/jbosstools-3.3.0.Beta1/central/plugins/org.jboss.tools.central.discovery/plugin.xml
Log:
add versions to GWT feature group so as to differentiate it from trunk content (to verify JBIDE-10401)
Modified: branches/jbosstools-3.3.0.Beta1/central/plugins/org.jboss.tools.central.discovery/plugin.xml
===================================================================
--- branches/jbosstools-3.3.0.Beta1/central/plugins/org.jboss.tools.central.discovery/plugin.xml 2012-02-21 17:25:36 UTC (rev 38940)
+++ branches/jbosstools-3.3.0.Beta1/central/plugins/org.jboss.tools.central.discovery/plugin.xml 2012-02-21 18:04:49 UTC (rev 38941)
@@ -334,7 +334,7 @@
<!-- TODO: change URL to http://download.jboss.org/jbosstools/updates/indigo/ for/after Beta1 -->
<connectorDescriptor
categoryId="org.jboss.tools.central.discovery.web"
- description="Google Plugin for Eclipse (GPE) + Google Web Toolkit SDK (GWT)"
+ description="Google Plugin for Eclipse (GPE) 2.5.1 + Google Web Toolkit SDK (GWT) 2.4.0"
id="com.google.gwt.eclipse.sdkbundle.e37.feature"
kind="task"
license="EPL, Other"
14 years, 1 month