JBoss Tools SVN: r37030 - trunk/common/plugins/org.jboss.tools.common.text.ext.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-12-06 19:14:24 -0500 (Tue, 06 Dec 2011)
New Revision: 37030
Modified:
trunk/common/plugins/org.jboss.tools.common.text.ext/plugin.xml
Log:
JBIDE-10302
https://issues.jboss.org/browse/JBIDE-10302
FaceletSourceTagHyperlink is registered for content type org.eclipse.jst.jsp.core.tldsource.
Modified: trunk/common/plugins/org.jboss.tools.common.text.ext/plugin.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.text.ext/plugin.xml 2011-12-06 23:10:10 UTC (rev 37029)
+++ trunk/common/plugins/org.jboss.tools.common.text.ext/plugin.xml 2011-12-07 00:14:24 UTC (rev 37030)
@@ -553,6 +553,9 @@
id="org.jboss.tools.common.text.ext.xml.TAGLIB_XML" >
</partitiontype>
</contenttypeidentifier>
+ <contenttypeidentifier id="org.eclipse.jst.jsp.core.tldsource">
+ <partitiontype id="org.jboss.tools.common.text.ext.xml.TAGLIB_XML" />
+ </contenttypeidentifier>
</hyperlink>
<hyperlink
14 years
JBoss Tools SVN: r37029 - 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: 2011-12-06 18:10:10 -0500 (Tue, 06 Dec 2011)
New Revision: 37029
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AdapterWizardPage.java
Log:
[JBIDE-10171] corrected checkbox behaviour (was inverted). checking "create new project" should disable button and project text - corrected validator
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AdapterWizardPage.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AdapterWizardPage.java 2011-12-06 23:06:17 UTC (rev 37028)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AdapterWizardPage.java 2011-12-06 23:10:10 UTC (rev 37029)
@@ -142,7 +142,7 @@
.converting(new InvertingBooleanConverter())
.in(dbc);
dbc.addValidationStatusProvider(
- new EnableProjectValidator(newProjectObservable, newProjectNameObservable));
+ new NewProjectValidator(newProjectObservable, newProjectNameObservable));
Button browseProjectsButton = new Button(projectGroup, SWT.NONE);
browseProjectsButton.setText("Browse");
@@ -451,15 +451,15 @@
* A multi validator that validates the state of the project that shall be
* (OpenShift) enabled
*/
- private class EnableProjectValidator extends MultiValidator {
+ private class NewProjectValidator extends MultiValidator {
- private IObservableValue enableProjectObservable;
- private IObservableValue enabledProjectNameObservable;
+ private IObservableValue newProjectObservable;
+ private IObservableValue newProjectNameObservable;
- public EnableProjectValidator(IObservableValue enableProjectObservable,
- IObservableValue enabledProjectNameObservable) {
- this.enableProjectObservable = enableProjectObservable;
- this.enabledProjectNameObservable = enabledProjectNameObservable;
+ public NewProjectValidator(IObservableValue newProjectObservable,
+ IObservableValue newProjectNameObservable) {
+ this.newProjectObservable = newProjectObservable;
+ this.newProjectNameObservable = newProjectNameObservable;
}
@Override
@@ -470,13 +470,12 @@
* is tracking what observables are read to know when he has to
* recalculate it's state.
*/
- if (Boolean.FALSE.equals(enableProjectObservable.getValue())) {
+ if (Boolean.TRUE.equals(newProjectObservable.getValue())) {
return ValidationStatus.ok();
- }
-
- if (enabledProjectNameObservable != null
- && enabledProjectNameObservable.getValue() != null
- && (!((String) enabledProjectNameObservable.getValue()).isEmpty())) {
+ }
+
+ if (newProjectNameObservable.getValue() != null
+ && (!((String) newProjectNameObservable.getValue()).isEmpty())) {
return ValidationStatus.ok();
} else {
return ValidationStatus.error(
14 years
JBoss Tools SVN: r37028 - trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2011-12-06 18:06:17 -0500 (Tue, 06 Dec 2011)
New Revision: 37028
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring/CDIRenameProcessor.java
Log:
EL refactoring for @Named beans doesn't work properly https://issues.jboss.org/browse/JBIDE-10210
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring/CDIRenameProcessor.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring/CDIRenameProcessor.java 2011-12-06 23:05:20 UTC (rev 37027)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring/CDIRenameProcessor.java 2011-12-06 23:06:17 UTC (rev 37028)
@@ -89,6 +89,12 @@
}
}
lastChange = new CDIFileChange(file.getName(), file);
+
+ if(CDIFileChange.getEditor(file) != null)
+ lastChange.setSaveMode(TextFileChange.LEAVE_DIRTY);
+ else
+ lastChange.setSaveMode(TextFileChange.FORCE_SAVE);
+
MultiTextEdit root = new MultiTextEdit();
lastChange.setEdit(root);
rootChange.add(lastChange);
14 years
JBoss Tools SVN: r37027 - 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: 2011-12-06 18:05:20 -0500 (Tue, 06 Dec 2011)
New Revision: 37027
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AdapterWizardPage.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AdapterWizardPageModel.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ImportProjectWizard.java
Log:
[JBIDE-10171] corrected checkbox behaviour (was inverted). checking "create new project" should disable button and project text
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AdapterWizardPage.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AdapterWizardPage.java 2011-12-06 22:45:42 UTC (rev 37026)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AdapterWizardPage.java 2011-12-06 23:05:20 UTC (rev 37027)
@@ -139,6 +139,7 @@
ValueBindingBuilder
.bind(WidgetProperties.enabled().observe(newProjectText))
.notUpdating(newProjectObservable)
+ .converting(new InvertingBooleanConverter())
.in(dbc);
dbc.addValidationStatusProvider(
new EnableProjectValidator(newProjectObservable, newProjectNameObservable));
@@ -151,6 +152,7 @@
ValueBindingBuilder
.bind(WidgetProperties.enabled().observe(browseProjectsButton))
.notUpdating(newProjectObservable)
+ .converting(new InvertingBooleanConverter())
.in(dbc);
return projectGroup;
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AdapterWizardPageModel.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AdapterWizardPageModel.java 2011-12-06 22:45:42 UTC (rev 37026)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AdapterWizardPageModel.java 2011-12-06 23:05:20 UTC (rev 37027)
@@ -46,7 +46,7 @@
public AdapterWizardPageModel(ImportProjectWizardModel wizardModel) {
this.wizardModel = wizardModel;
setRemoteName(REMOTE_NAME_DEFAULT);
- setNewProject(false);
+ setNewProject(true);
}
public void setNewProject(boolean newProject) {
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ImportProjectWizard.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ImportProjectWizard.java 2011-12-06 22:45:42 UTC (rev 37026)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ImportProjectWizard.java 2011-12-06 23:05:20 UTC (rev 37027)
@@ -69,7 +69,7 @@
private IStatus performOperations(IProgressMonitor monitor, IStatus status) {
try {
- if (!model.isNewProject()) {
+ if (model.isNewProject()) {
model.importProject(monitor);
} else {
if (!askForConfirmation()) {
14 years
JBoss Tools SVN: r37026 - 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: 2011-12-06 17:45:42 -0500 (Tue, 06 Dec 2011)
New Revision: 37026
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ImportProjectWizard.java
Log:
[JBIDE-10171] added confirmation dialog when user has chosen to use an existing project
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ImportProjectWizard.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ImportProjectWizard.java 2011-12-06 22:34:04 UTC (rev 37025)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ImportProjectWizard.java 2011-12-06 22:45:42 UTC (rev 37026)
@@ -22,6 +22,7 @@
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.dialogs.ErrorDialog;
+import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.wizard.Wizard;
import org.eclipse.jgit.api.errors.JGitInternalException;
@@ -71,6 +72,9 @@
if (!model.isNewProject()) {
model.importProject(monitor);
} else {
+ if (!askForConfirmation()) {
+ return Status.CANCEL_STATUS;
+ }
model.addToExistingProject(monitor);
}
return Status.OK_STATUS;
@@ -115,6 +119,20 @@
}
}
+ private boolean askForConfirmation() {
+ final boolean[] confirmed = new boolean[1];
+ getShell().getDisplay().syncExec(new Runnable() {
+
+ @Override
+ public void run() {
+ confirmed[0] = MessageDialog.openConfirm(getShell(),
+ "Confirm project modification",
+ "This will copy OpenShit configuration files to your project.\n" +
+ "Are you sure that you want to allow this?");
+ }});
+ return confirmed[0];
+ }
+
@Override
public void addPages() {
this.model = new ImportProjectWizardModel();
14 years
JBoss Tools SVN: r37025 - 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: 2011-12-06 17:34:04 -0500 (Tue, 06 Dec 2011)
New Revision: 37025
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ImportProjectWizard.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ImportProjectWizardModel.java
Log:
[JBIDE-10171] renamed ImportProjectWizardModel#enableProject to ImportProjectWizardModel#addToExistingProject
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ImportProjectWizard.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ImportProjectWizard.java 2011-12-06 22:32:12 UTC (rev 37024)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ImportProjectWizard.java 2011-12-06 22:34:04 UTC (rev 37025)
@@ -71,7 +71,7 @@
if (!model.isNewProject()) {
model.importProject(monitor);
} else {
- model.enableProject(monitor);
+ model.addToExistingProject(monitor);
}
return Status.OK_STATUS;
} catch (IOException e) {
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ImportProjectWizardModel.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ImportProjectWizardModel.java 2011-12-06 22:32:12 UTC (rev 37024)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ImportProjectWizardModel.java 2011-12-06 22:34:04 UTC (rev 37025)
@@ -251,7 +251,7 @@
* @see #shareProject
* @see #createServerAdapterIfRequired
*/
- public void enableProject(IProgressMonitor monitor)
+ public void addToExistingProject(IProgressMonitor monitor)
throws OpenShiftException, InvocationTargetException, InterruptedException, IOException, CoreException,
URISyntaxException {
// File repositoryFile =
14 years
JBoss Tools SVN: r37024 - in trunk/openshift/plugins/org.jboss.tools.openshift.express.ui: src/org/jboss/tools/openshift/express/internal/ui/wizard and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-12-06 17:32:12 -0500 (Tue, 06 Dec 2011)
New Revision: 37024
Removed:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/utils/JavaProjectUtils.java
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/META-INF/MANIFEST.MF
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/SelectExistingProjectDialog.java
Log:
[JBIDE-10171] removed erroneous #setMatchEmptySelection(false), replaced check for java nature by check for wtp proj (checking for module nature)
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/META-INF/MANIFEST.MF 2011-12-06 22:16:56 UTC (rev 37023)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/META-INF/MANIFEST.MF 2011-12-06 22:32:12 UTC (rev 37024)
@@ -31,11 +31,11 @@
org.eclipse.wst.common.modulecore;bundle-version="1.2.100",
org.eclipse.team.ui;bundle-version="3.6.100",
org.eclipse.jdt.launching;bundle-version="3.6.0",
- org.eclipse.jdt.core;bundle-version="3.7.0",
org.eclipse.debug.ui;bundle-version="3.7.0",
org.eclipse.ui.navigator;bundle-version="3.5.100",
org.eclipse.ui.console;bundle-version="3.5.100",
- org.eclipse.core.expressions;bundle-version="3.4.300"
+ org.eclipse.core.expressions;bundle-version="3.4.300",
+ org.eclipse.wst.common.modulecore;bundle-version="1.2.101"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Import-Package: org.jboss.tools.common.databinding,
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/SelectExistingProjectDialog.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/SelectExistingProjectDialog.java 2011-12-06 22:16:56 UTC (rev 37023)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/SelectExistingProjectDialog.java 2011-12-06 22:32:12 UTC (rev 37024)
@@ -15,24 +15,28 @@
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.dialogs.ElementListSelectionDialog;
import org.eclipse.ui.ide.IDE.SharedImages;
+import org.eclipse.wst.common.componentcore.internal.util.IModuleConstants;
import org.jboss.tools.openshift.egit.core.EGitUtils;
-import org.jboss.tools.openshift.express.internal.utils.JavaProjectUtils;
/**
* @author André Dietisheim
*/
public class SelectExistingProjectDialog extends ElementListSelectionDialog {
- public SelectExistingProjectDialog(Shell shell) {
+ public SelectExistingProjectDialog(String openShiftAppName, Shell shell) {
super(shell, new ProjectLabelProvider());
setTitle("Project Selection");
- setMessage("Please select the project that shall be pushed to OpenShift");
+ setMessage(NLS.bind(
+ "Select an existing project for {0}.\nOnly java projects which are not Team shared can be used.",
+ openShiftAppName));
setMultipleSelection(false);
setAllowDuplicates(false);
setElements(getProjects());
@@ -57,13 +61,21 @@
return false;
}
- if (!JavaProjectUtils.isJavaProject(project)) {
+ if (!hasModuleNature(project)) {
return false;
}
return true;
}
+ private boolean hasModuleNature(IProject project) {
+ try {
+ return project.hasNature(IModuleConstants.MODULE_NATURE_ID);
+ } catch(CoreException e) {
+ return false;
+ }
+ }
+
private static class ProjectLabelProvider extends LabelProvider {
@Override
Deleted: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/utils/JavaProjectUtils.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/utils/JavaProjectUtils.java 2011-12-06 22:16:56 UTC (rev 37023)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/utils/JavaProjectUtils.java 2011-12-06 22:32:12 UTC (rev 37024)
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * 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.utils;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jdt.core.JavaCore;
-
-/**
- * @author André Dietisheim
- */
-public class JavaProjectUtils {
-
- public static boolean isJavaProject(IProject project) {
- try {
- if (!project.hasNature(JavaCore.NATURE_ID)) {
- return false;
- }
- } catch (CoreException e) {
- // project is not opened, does not exist, etc.
- return false;
- }
- return true;
- }
-
-}
14 years
JBoss Tools SVN: r37023 - 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: 2011-12-06 17:16:56 -0500 (Tue, 06 Dec 2011)
New Revision: 37023
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AdapterWizardPage.java
Log:
[JBIDE-10171] corrected label of server adapter group ("JBoss Server Adapter" -> "OpenShift JBoss Server Adapter")
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AdapterWizardPage.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AdapterWizardPage.java 2011-12-06 21:59:22 UTC (rev 37022)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AdapterWizardPage.java 2011-12-06 22:16:56 UTC (rev 37023)
@@ -118,7 +118,7 @@
.bind(WidgetProperties.selection().observe(newProjectCheckbox))
.to(newProjectObservable)
.in(dbc);
-
+
this.newProjectCheckboxIsEnabled = WidgetProperties.enabled().observe(newProjectCheckbox);
Label existingProjectLabel = new Label(projectGroup, SWT.NONE);
@@ -276,7 +276,8 @@
@Override
public void widgetSelected(SelectionEvent e) {
- SelectExistingProjectDialog dialog = new SelectExistingProjectDialog(getShell());
+ SelectExistingProjectDialog dialog =
+ new SelectExistingProjectDialog(model.getApplicationName(), getShell());
if (dialog.open() == Dialog.OK) {
Object selectedProject = dialog.getFirstResult();
if (selectedProject instanceof IProject) {
@@ -335,7 +336,7 @@
private Group createAdapterGroup(Composite parent, DataBindingContext dbc) {
Group serverAdapterGroup = new Group(parent, SWT.BORDER);
- serverAdapterGroup.setText("JBoss Server adapter");
+ serverAdapterGroup.setText("OpenShift JBoss Server adapter");
GridLayoutFactory.fillDefaults().margins(6, 6).applyTo(serverAdapterGroup);
Composite c = new Composite(serverAdapterGroup, SWT.NONE);
@@ -380,7 +381,7 @@
return new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
model.getWizardModel().setProperty(
- AdapterWizardPageModel.CREATE_SERVER,serverAdapterCheckbox.getSelection());
+ AdapterWizardPageModel.CREATE_SERVER, serverAdapterCheckbox.getSelection());
enableServerWidgets(serverAdapterCheckbox.getSelection());
}
};
@@ -400,7 +401,7 @@
setTitle(NLS.bind("Import OpenShift application {0}", model.getApplicationName()));
newProjectCheckboxIsEnabled.setValue(model.isJBossAS7Application());
-
+
model.resetRepositoryPath();
serverTypeToCreate = getServerTypeToCreate();
model.getWizardModel().setProperty(AdapterWizardPageModel.SERVER_TYPE, serverTypeToCreate);
14 years
JBoss Tools SVN: r37022 - in trunk/jst/tests/org.jboss.tools.jst.web.ui.test: src/org/jboss/tools/jst/web/ui/test and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-12-06 16:59:22 -0500 (Tue, 06 Dec 2011)
New Revision: 37022
Added:
trunk/jst/tests/org.jboss.tools.jst.web.ui.test/src/org/jboss/tools/jst/web/ui/test/ConfigurationBlockTest.java
Modified:
trunk/jst/tests/org.jboss.tools.jst.web.ui.test/META-INF/MANIFEST.MF
trunk/jst/tests/org.jboss.tools.jst.web.ui.test/src/org/jboss/tools/jst/web/ui/test/JstWebUiAllTests.java
Log:
JBIDE-10364
https://issues.jboss.org/browse/JBIDE-10364
Test added.
Modified: trunk/jst/tests/org.jboss.tools.jst.web.ui.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.web.ui.test/META-INF/MANIFEST.MF 2011-12-06 21:56:25 UTC (rev 37021)
+++ trunk/jst/tests/org.jboss.tools.jst.web.ui.test/META-INF/MANIFEST.MF 2011-12-06 21:59:22 UTC (rev 37022)
@@ -5,8 +5,10 @@
Bundle-Version: 3.3.0.qualifier
Bundle-Vendor: %Bundle-Vendor.0
Require-Bundle: org.jboss.tools.jst.web.ui,
+ org.jboss.tools.jst.web,
org.eclipse.ui,
org.eclipse.gef,
+ org.jboss.tools.common.ui,
org.jboss.tools.common.model.ui,
org.jboss.tools.common.model.ui.test,
org.jboss.tools.tests,
Added: trunk/jst/tests/org.jboss.tools.jst.web.ui.test/src/org/jboss/tools/jst/web/ui/test/ConfigurationBlockTest.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.web.ui.test/src/org/jboss/tools/jst/web/ui/test/ConfigurationBlockTest.java (rev 0)
+++ trunk/jst/tests/org.jboss.tools.jst.web.ui.test/src/org/jboss/tools/jst/web/ui/test/ConfigurationBlockTest.java 2011-12-06 21:59:22 UTC (rev 37022)
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * 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.jst.web.ui.test;
+
+import org.eclipse.jface.preference.PreferenceDialog;
+import org.eclipse.ui.dialogs.PreferencesUtil;
+import org.jboss.tools.common.ui.preferences.SeverityPreferencePage;
+import org.jboss.tools.jst.web.ui.WebUiPlugin;
+import org.jboss.tools.jst.web.ui.internal.preferences.WebXMLPreferencesMessages;
+import org.jboss.tools.jst.web.ui.internal.preferences.WebXMLValidatorPreferencePage;
+import org.jboss.tools.jst.web.validation.WebXMLPreferences;
+
+import junit.framework.TestCase;
+
+/**
+ * @author Viacheslav Kabanovich
+ */
+public class ConfigurationBlockTest extends TestCase {
+
+ public void testFilter() {
+ String preferencePageId = WebXMLValidatorPreferencePage.PREF_ID;
+ PreferenceDialog dialog = PreferencesUtil.createPreferenceDialogOn(WebUiPlugin.getShell(),
+ preferencePageId,
+ new String[]{preferencePageId},
+ WebXMLPreferences.INVALID_ROLE_REF);
+ Object selectedPage = dialog.getSelectedPage();
+ assertTrue(selectedPage instanceof SeverityPreferencePage);
+ SeverityPreferencePage page = (SeverityPreferencePage)selectedPage;
+ assertEquals(WebXMLPreferencesMessages.WebXMLValidatorConfigurationBlock_pb_invalidRoleRef_label, page.getFilterText());
+
+ dialog.setBlockOnOpen(false);
+ dialog.open();
+ dialog.close();
+ }
+
+}
Property changes on: trunk/jst/tests/org.jboss.tools.jst.web.ui.test/src/org/jboss/tools/jst/web/ui/test/ConfigurationBlockTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/jst/tests/org.jboss.tools.jst.web.ui.test/src/org/jboss/tools/jst/web/ui/test/JstWebUiAllTests.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.web.ui.test/src/org/jboss/tools/jst/web/ui/test/JstWebUiAllTests.java 2011-12-06 21:56:25 UTC (rev 37021)
+++ trunk/jst/tests/org.jboss.tools.jst.web.ui.test/src/org/jboss/tools/jst/web/ui/test/JstWebUiAllTests.java 2011-12-06 21:59:22 UTC (rev 37022)
@@ -24,6 +24,7 @@
public static Test suite() {
TestSuite suite = new TestSuite(JstWebUiAllTests.class.getName());
+ suite.addTestSuite(ConfigurationBlockTest.class);
suite.addTestSuite(WebViewsTest.class);
suite.addTestSuite(WebWizardsTest.class);
suite.addTestSuite(JstWebUiPreferencesPagesTest.class);
14 years
JBoss Tools SVN: r37021 - 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: 2011-12-06 16:56:25 -0500 (Tue, 06 Dec 2011)
New Revision: 37021
Added:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/SelectExistingProjectDialog.java
Removed:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/SelectEnablableProjectDialog.java
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AdapterWizardPage.java
Log:
[JBIDE-10171] renamed "select existing project" dialog class
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AdapterWizardPage.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AdapterWizardPage.java 2011-12-06 21:53:09 UTC (rev 37020)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AdapterWizardPage.java 2011-12-06 21:56:25 UTC (rev 37021)
@@ -276,7 +276,7 @@
@Override
public void widgetSelected(SelectionEvent e) {
- SelectEnablableProjectDialog dialog = new SelectEnablableProjectDialog(getShell());
+ SelectExistingProjectDialog dialog = new SelectExistingProjectDialog(getShell());
if (dialog.open() == Dialog.OK) {
Object selectedProject = dialog.getFirstResult();
if (selectedProject instanceof IProject) {
Deleted: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/SelectEnablableProjectDialog.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/SelectEnablableProjectDialog.java 2011-12-06 21:53:09 UTC (rev 37020)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/SelectEnablableProjectDialog.java 2011-12-06 21:56:25 UTC (rev 37021)
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * 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.wizard;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.dialogs.ElementListSelectionDialog;
-import org.eclipse.ui.ide.IDE.SharedImages;
-import org.jboss.tools.openshift.egit.core.EGitUtils;
-import org.jboss.tools.openshift.express.internal.utils.JavaProjectUtils;
-
-/**
- * @author André Dietisheim
- */
-public class SelectEnablableProjectDialog extends ElementListSelectionDialog {
-
- public SelectEnablableProjectDialog(Shell shell) {
- super(shell, new ProjectLabelProvider());
- setTitle("Project Selection");
- setMessage("Please select the project that shall be pushed to OpenShift");
- setMultipleSelection(false);
- setAllowDuplicates(false);
- setElements(getProjects());
- }
-
- private Object[] getProjects() {
- List<IProject> projects = new ArrayList<IProject>();
- for (IProject project : ResourcesPlugin.getWorkspace().getRoot().getProjects()) {
- if (isValid(project)) {
- projects.add(project);
- }
- }
- return projects.toArray();
- }
-
- private boolean isValid(IProject project) {
- if (EGitUtils.isShared(project)) {
- return false;
- }
-
- if (EGitUtils.hasDotGitFolder(project)) {
- return false;
- }
-
- if (!JavaProjectUtils.isJavaProject(project)) {
- return false;
- }
-
- return true;
- }
-
- private static class ProjectLabelProvider extends LabelProvider {
-
- @Override
- public Image getImage(Object element) {
- return PlatformUI.getWorkbench().getSharedImages().getImage(SharedImages.IMG_OBJ_PROJECT);
- }
-
- @Override
- public String getText(Object element) {
- if (!(element instanceof IProject)) {
- return null;
- }
-
- return ((IProject) element).getName();
- }
-
- }
-
-}
Copied: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/SelectExistingProjectDialog.java (from rev 36986, trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/SelectEnablableProjectDialog.java)
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/SelectExistingProjectDialog.java (rev 0)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/SelectExistingProjectDialog.java 2011-12-06 21:56:25 UTC (rev 37021)
@@ -0,0 +1,85 @@
+/*******************************************************************************
+ * 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.wizard;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.dialogs.ElementListSelectionDialog;
+import org.eclipse.ui.ide.IDE.SharedImages;
+import org.jboss.tools.openshift.egit.core.EGitUtils;
+import org.jboss.tools.openshift.express.internal.utils.JavaProjectUtils;
+
+/**
+ * @author André Dietisheim
+ */
+public class SelectExistingProjectDialog extends ElementListSelectionDialog {
+
+ public SelectExistingProjectDialog(Shell shell) {
+ super(shell, new ProjectLabelProvider());
+ setTitle("Project Selection");
+ setMessage("Please select the project that shall be pushed to OpenShift");
+ setMultipleSelection(false);
+ setAllowDuplicates(false);
+ setElements(getProjects());
+ }
+
+ private Object[] getProjects() {
+ List<IProject> projects = new ArrayList<IProject>();
+ for (IProject project : ResourcesPlugin.getWorkspace().getRoot().getProjects()) {
+ if (isValid(project)) {
+ projects.add(project);
+ }
+ }
+ return projects.toArray();
+ }
+
+ private boolean isValid(IProject project) {
+ if (EGitUtils.isShared(project)) {
+ return false;
+ }
+
+ if (EGitUtils.hasDotGitFolder(project)) {
+ return false;
+ }
+
+ if (!JavaProjectUtils.isJavaProject(project)) {
+ return false;
+ }
+
+ return true;
+ }
+
+ private static class ProjectLabelProvider extends LabelProvider {
+
+ @Override
+ public Image getImage(Object element) {
+ return PlatformUI.getWorkbench().getSharedImages().getImage(SharedImages.IMG_OBJ_PROJECT);
+ }
+
+ @Override
+ public String getText(Object element) {
+ if (!(element instanceof IProject)) {
+ return null;
+ }
+
+ return ((IProject) element).getName();
+ }
+
+ }
+
+}
Property changes on: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/SelectExistingProjectDialog.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
14 years