JBoss Tools SVN: r22808 - branches/jbosstools-3.1.x/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-06-15 08:55:22 -0400 (Tue, 15 Jun 2010)
New Revision: 22808
Modified:
branches/jbosstools-3.1.x/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/XJob.java
Log:
https://jira.jboss.org/browse/JBIDE-6374
Modified: branches/jbosstools-3.1.x/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/XJob.java
===================================================================
--- branches/jbosstools-3.1.x/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/XJob.java 2010-06-15 12:35:06 UTC (rev 22807)
+++ branches/jbosstools-3.1.x/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/XJob.java 2010-06-15 12:55:22 UTC (rev 22808)
@@ -118,12 +118,18 @@
ids.add(runnable.getId());
list.add(runnable);
}
- if (getState() == Job.NONE) {
+ if (getState() == Job.NONE || !isRunning()) {
schedule(1000);
}
}
}
+ private boolean isRunning() {
+ synchronized(this) {
+ return running;
+ }
+ }
+
void addRunnableInternalWithPriority(XRunnable runnable) {
if (!isSuspended()) {
synchronized (this) {
@@ -132,19 +138,27 @@
ids.add(runnable.getId());
list.add(0, runnable);
}
- if (getState() == Job.NONE) {
+ if (getState() == Job.NONE || !isRunning()) {
schedule(0);
}
}
}
+
+ boolean running = false;
@Override
public IStatus runInWorkspace(IProgressMonitor monitor)
throws CoreException {
+ synchronized(this) {
+ running = true;
+ }
while(true) {
XRunnable r = null;
synchronized (this) {
- if(list.size() == 0) break;
+ if(list.size() == 0) {
+ running = false;
+ break;
+ }
r = list.remove(0);
}
// monitor.subTask(r.getId()) is irrelevant for system jobs
@@ -154,13 +168,13 @@
//Bundle b = Platform.getBundle("org.jboss.tools.common.model");
//state = b==null ? -1 : b.getState();
//if(state == Bundle.ACTIVE) {
+ synchronized (this) {
+ ids.remove(r.getId());
+ }
if (!isSuspended()) {
r.run();
}
//}
- synchronized (this) {
- ids.remove(r.getId());
- }
}
return Status.OK_STATUS;
}
@@ -173,4 +187,4 @@
XJob.suspended = suspended;
}
-}
+}
\ No newline at end of file
14 years, 7 months
JBoss Tools SVN: r22807 - in trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui: editor/check and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: yzhishko
Date: 2010-06-15 08:35:06 -0400 (Tue, 15 Jun 2010)
New Revision: 22807
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/JsfUIMessages.java
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/editor/check/JSFNaturesInfoDialog.java
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/editor/check/KBNaturesInfoDialog.java
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/editor/check/ProjectNaturesChecker.java
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/editor/check/ProjectNaturesInfoDialog.java
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/messages.properties
Log:
https://jira.jboss.org/browse/JBIDE-6409 - fixed
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/JsfUIMessages.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/JsfUIMessages.java 2010-06-15 12:05:29 UTC (rev 22806)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/JsfUIMessages.java 2010-06-15 12:35:06 UTC (rev 22807)
@@ -30,6 +30,17 @@
public static String EL_REFACTOR_RENAME_HANDLER_ERROR;
public static String RENAME_EL_VARIABLE_WIZARD_EL_VARIABLE_NAME;
+ public static String IS_JSF_CHECK_NEED;
+ public static String IS_KB_NATURE_CHECK_NEED;
+ public static String IS_JSF_NATURE_CHECK_NEED;
+ public static String ADD_JSF_CAPABILITIES_BUTTTON_LABEL;
+ public static String ENABLE_JSF_CAPABILITIES_TEXT;
+ public static String ENABLE_JSF_CODE_COMPLETION_BUTTON_LABEL;
+ public static String ENABLE_JSF_CODE_COMPLETION_TEXT;
+ public static String DONT_SHOW_CHECKER_DIALOG;
+ public static String MISSING_NATURES_INFO_MESSAGE_TITLE;
+ public static String SKIP_BUTTON_LABEL;
+
static {
// initialize resource bundle
NLS.initializeMessages(BUNDLE_NAME, JsfUIMessages.class);
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/editor/check/JSFNaturesInfoDialog.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/editor/check/JSFNaturesInfoDialog.java 2010-06-15 12:05:29 UTC (rev 22806)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/editor/check/JSFNaturesInfoDialog.java 2010-06-15 12:35:06 UTC (rev 22807)
@@ -17,6 +17,7 @@
import org.eclipse.core.runtime.CoreException;
import org.eclipse.swt.custom.BusyIndicator;
import org.eclipse.ui.PlatformUI;
+import org.jboss.tools.jsf.ui.JsfUIMessages;
import org.jboss.tools.jsf.ui.editor.check.wizards.AddJSFCapabilitiesWizard;
/**
@@ -27,10 +28,8 @@
public class JSFNaturesInfoDialog extends ProjectNaturesInfoDialog {
- private static final String fixButtonLabel = "Add JSF Capabilities..."; //$NON-NLS-1$
-
public JSFNaturesInfoDialog(IProject project) {
- super(project, fixButtonLabel);
+ super(project, JsfUIMessages.ADD_JSF_CAPABILITIES_BUTTTON_LABEL);
}
@Override
@@ -39,18 +38,15 @@
.getActiveWorkbenchWindow().getShell().getDisplay(),
new Runnable() {
public void run() {
- AddJSFCapabilitiesWizard.getInstance(project).run(
- null);
+ AddJSFCapabilitiesWizard.getInstance(project).run(null);
}
});
}
@Override
protected String getMessageInfo() {
- String dialogMessage = MessageFormat.format("JBoss Tools Editor might not fully work in project \"{0}" + //$NON-NLS-1$
- "\" because it does not have JSF and code completion enabled completely.\n\n" //$NON-NLS-1$
- + "Please use the Configure menu on the project or \"Add JSF Capabilities...\" fix button to enable JSF if " //$NON-NLS-1$
- + "you want all features of the editor working.",project.getName()); //$NON-NLS-1$
+ String dialogMessage = MessageFormat.format(
+ JsfUIMessages.ENABLE_JSF_CAPABILITIES_TEXT, project.getName());
return dialogMessage;
}
@@ -58,8 +54,8 @@
protected void skipButtonPressed() {
try {
project.setPersistentProperty(
- ProjectNaturesChecker.IS_JSF_NATURES_CHECK_NEED, Boolean
- .toString(!isRemember));
+ ProjectNaturesChecker.IS_JSF_NATURES_CHECK_NEED,
+ Boolean.toString(!isRemember));
} catch (CoreException e) {
}
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/editor/check/KBNaturesInfoDialog.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/editor/check/KBNaturesInfoDialog.java 2010-06-15 12:05:29 UTC (rev 22806)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/editor/check/KBNaturesInfoDialog.java 2010-06-15 12:35:06 UTC (rev 22807)
@@ -30,6 +30,7 @@
import org.eclipse.ui.ide.IDE;
import org.eclipse.ui.internal.views.markers.MarkerSupportInternalUtilities;
import org.eclipse.ui.views.markers.internal.MarkerMessages;
+import org.jboss.tools.jsf.ui.JsfUIMessages;
import org.jboss.tools.jsf.ui.JsfUiPlugin;
import org.jboss.tools.jsf.ui.editor.check.wizards.QuickFixWizard;
import org.jboss.tools.jst.web.kb.internal.KbProject;
@@ -43,10 +44,8 @@
@SuppressWarnings("restriction")
public class KBNaturesInfoDialog extends ProjectNaturesInfoDialog {
- private static final String fixButtonLabel = "Enable JSF Code Completion..."; //$NON-NLS-1$
-
public KBNaturesInfoDialog(IProject project) {
- super(project, fixButtonLabel);
+ super(project, JsfUIMessages.ENABLE_JSF_CODE_COMPLETION_BUTTON_LABEL);
}
@Override
@@ -95,10 +94,9 @@
@Override
protected String getMessageInfo() {
- String dialogMessage = MessageFormat.format("The project \"{0}" + //$NON-NLS-1$
- "\" does not have JSF code completion and validation enabled completely.\n\n" //$NON-NLS-1$
- + "Please use \"Enabale JSF Code Completion...\" fix button if " //$NON-NLS-1$
- + "you want these features working.",project.getName()); //$NON-NLS-1$
+ String dialogMessage = MessageFormat.format(
+ JsfUIMessages.ENABLE_JSF_CODE_COMPLETION_TEXT,
+ project.getName());
return dialogMessage;
}
@@ -120,8 +118,8 @@
protected void skipButtonPressed() {
try {
project.setPersistentProperty(
- ProjectNaturesChecker.IS_KB_NATURES_CHECK_NEED, Boolean
- .toString(!isRemember));
+ ProjectNaturesChecker.IS_KB_NATURES_CHECK_NEED,
+ Boolean.toString(!isRemember));
} catch (CoreException e) {
}
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/editor/check/ProjectNaturesChecker.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/editor/check/ProjectNaturesChecker.java 2010-06-15 12:05:29 UTC (rev 22806)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/editor/check/ProjectNaturesChecker.java 2010-06-15 12:35:06 UTC (rev 22807)
@@ -12,13 +12,11 @@
import java.util.HashSet;
import java.util.Set;
-
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResourceChangeEvent;
import org.eclipse.core.resources.IResourceChangeListener;
import org.eclipse.core.resources.IResourceDelta;
-import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.QualifiedName;
import org.eclipse.jdt.core.IJavaElement;
@@ -29,6 +27,7 @@
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;
import org.jboss.tools.common.reporting.ProblemReportingHelper;
+import org.jboss.tools.jsf.ui.JsfUIMessages;
import org.jboss.tools.jst.jsp.JspEditorPlugin;
import org.jboss.tools.jst.jsp.util.FileUtil;
import org.jboss.tools.jst.web.kb.IKbProject;
@@ -46,11 +45,11 @@
private ProjectNaturesPartListener partListener = new ProjectNaturesPartListener();
private static final String SEARCH_CLASS = "javax.faces.webapp.FacesServlet"; //$NON-NLS-1$
public static final QualifiedName IS_JSF_NATURES_CHECK_NEED = new QualifiedName(
- "", "Is JSF natures check"); //$NON-NLS-1$ //$NON-NLS-2$
+ "", JsfUIMessages.IS_JSF_NATURE_CHECK_NEED); //$NON-NLS-1$
public static final QualifiedName IS_KB_NATURES_CHECK_NEED = new QualifiedName(
- "", "Is KB natures check"); //$NON-NLS-1$ //$NON-NLS-2$
+ "", JsfUIMessages.IS_KB_NATURE_CHECK_NEED); //$NON-NLS-1$
public static final QualifiedName IS_JSF_CHECK_NEED = new QualifiedName(
- "", "Is JSF check"); //$NON-NLS-1$ //$NON-NLS-2$
+ "", JsfUIMessages.IS_JSF_CHECK_NEED); //$NON-NLS-1$
private Set<IProject> projectsCollection;
private static final String STRUTS_NATURE_ID = "org.jboss.tools.struts.strutsnature"; //$NON-NLS-1$
@@ -173,10 +172,10 @@
if (project.getPersistentProperty(IS_JSF_NATURES_CHECK_NEED) == null) {
project
.setPersistentProperty(IS_JSF_NATURES_CHECK_NEED,
- "true"); //$NON-NLS-1$
+ Boolean.TRUE.toString());
}
if (project.getPersistentProperty(IS_KB_NATURES_CHECK_NEED) == null) {
- project.setPersistentProperty(IS_KB_NATURES_CHECK_NEED, "true"); //$NON-NLS-1$
+ project.setPersistentProperty(IS_KB_NATURES_CHECK_NEED, Boolean.TRUE.toString());
}
}
}
@@ -222,12 +221,12 @@
IJavaElement javaElement = FileUtil.searchForClass(JavaCore
.create(project), SEARCH_CLASS);
if (javaElement == null) {
- project.setPersistentProperty(IS_JSF_CHECK_NEED, "false"); //$NON-NLS-1$
+ project.setPersistentProperty(IS_JSF_CHECK_NEED, Boolean.FALSE.toString());
} else {
- project.setPersistentProperty(IS_JSF_CHECK_NEED, "true"); //$NON-NLS-1$
+ project.setPersistentProperty(IS_JSF_CHECK_NEED, Boolean.TRUE.toString());
}
} catch (CoreException e) {
- project.setPersistentProperty(IS_JSF_CHECK_NEED, "false"); //$NON-NLS-1$
+ project.setPersistentProperty(IS_JSF_CHECK_NEED, Boolean.FALSE.toString());
}
}
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/editor/check/ProjectNaturesInfoDialog.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/editor/check/ProjectNaturesInfoDialog.java 2010-06-15 12:05:29 UTC (rev 22806)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/editor/check/ProjectNaturesInfoDialog.java 2010-06-15 12:35:06 UTC (rev 22807)
@@ -28,6 +28,7 @@
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.browser.IWorkbenchBrowserSupport;
import org.jboss.tools.common.reporting.ProblemReportingHelper;
+import org.jboss.tools.jsf.ui.JsfUIMessages;
import org.jboss.tools.jst.jsp.JspEditorPlugin;
import org.jboss.tools.jst.jsp.messages.JstUIMessages;
@@ -42,14 +43,12 @@
private Button button;
private Link link;
protected boolean isRemember = false;
- private static final String QUESTION = "Do not show this dialog again!"; //$NON-NLS-1$
- private static final String TITLE = "Missing Natures"; //$NON-NLS-1$
protected IProject project;
protected ProjectNaturesInfoDialog(IProject project, String fixButtonLabel) {
super(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
- TITLE, null, "", INFORMATION, //$NON-NLS-1$
- new String[] { fixButtonLabel, "Skip" }, 0); //$NON-NLS-1$
+ JsfUIMessages.MISSING_NATURES_INFO_MESSAGE_TITLE, null, "", INFORMATION, //$NON-NLS-1$
+ new String[] { fixButtonLabel, JsfUIMessages.SKIP_BUTTON_LABEL }, 0);
this.project = project;
message = getMessageInfo();
}
@@ -74,7 +73,7 @@
isRemember = !isRemember;
}
});
- button.setText(QUESTION);
+ button.setText(JsfUIMessages.DONT_SHOW_CHECKER_DIALOG);
link = new Link(parent, SWT.NONE);
gridData = new GridData(GridData.HORIZONTAL_ALIGN_END);
gridData.grabExcessHorizontalSpace = true;
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/messages.properties
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/messages.properties 2010-06-15 12:05:29 UTC (rev 22806)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/messages.properties 2010-06-15 12:35:06 UTC (rev 22807)
@@ -31,3 +31,13 @@
NewXHTMLTemplatesWizardPage_5=&Preview:
NewXHTMLTemplatesWizardPage_6=Templates are 'New XHTML' templates found in the <a>XHTML Templates</a> preference page.
NewXHTMLTemplatesWizardPage_7=&Templates:
+IS_JSF_CHECK_NEED=Is JSF check
+IS_KB_NATURE_CHECK_NEED=Is KB natures check
+IS_JSF_NATURE_CHECK_NEED=Is JSF natures check
+ADD_JSF_CAPABILITIES_BUTTTON_LABEL=Add JSF Capabilities...
+ENABLE_JSF_CAPABILITIES_TEXT=JBoss Tools Editor might not fully work in project "{0}" because it does not have JSF and code completion enabled completely.\n\nPlease use the Configure menu on the project or "Add JSF Capabilities..." fix button to enable JSF if you want all features of the editor working.
+ENABLE_JSF_CODE_COMPLETION_BUTTON_LABEL=Enable JSF Code Completion...
+ENABLE_JSF_CODE_COMPLETION_TEXT=The project "{0}" does not have JSF code completion and validation enabled completely.\n\nPlease use "Enabale JSF Code Completion..." fix button if you want these features working.
+DONT_SHOW_CHECKER_DIALOG=Do not show this dialog again!
+MISSING_NATURES_INFO_MESSAGE_TITLE=Missing Natures
+SKIP_BUTTON_LABEL=Skip
\ No newline at end of file
14 years, 7 months
JBoss Tools SVN: r22806 - in trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext: config/requirement and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: lzoubek(a)redhat.com
Date: 2010-06-15 08:05:29 -0400 (Tue, 15 Jun 2010)
New Revision: 22806
Modified:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddServer.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/RemoveServer.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/StartServer.java
Log:
SWTBot extensions : fixes when server configuration changes
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java 2010-06-15 11:40:37 UTC (rev 22805)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java 2010-06-15 12:05:29 UTC (rev 22806)
@@ -492,22 +492,63 @@
}
public void addESBRuntime(String name, String version, String runtimeHome ) {
SWTBot wiz = open.preferenceOpen(ActionItem.Preference.JBossToolsJBossESBRuntimes.LABEL);
- wiz.button("Add").click();
- bot.shell(IDELabel.Shell.NEW_ESB_RUNTIME).activate();
- bot.text(0).setText(name);
- bot.text(1).setText(runtimeHome);
- String[] versions = bot.comboBox().items();
- int myIndex =0;
- for (int index=0;index<versions.length;index++) {
- if (version.equals(versions[index])) {
- myIndex=index;
- break;
+
+ boolean createRuntime = true;
+ // first check if Environment doesn't exist
+ SWTBotTable tbRuntimeEnvironments = bot.table();
+ int numRows = tbRuntimeEnvironments.rowCount();
+ if (numRows > 0) {
+ int currentRow = 0;
+ while (createRuntime && currentRow < numRows) {
+ if (tbRuntimeEnvironments.cell(currentRow, 1).equalsIgnoreCase(
+ name)) {
+ createRuntime = false;
+ } else {
+ currentRow++;
+ }
}
}
- bot.comboBox().setSelection(myIndex);
- open.finish(bot.activeShell().bot());
+ if (createRuntime) {
+ wiz.button("Add").click();
+ bot.shell(IDELabel.Shell.NEW_ESB_RUNTIME).activate();
+ bot.text(0).setText(name);
+ bot.text(1).setText(runtimeHome);
+ String[] versions = bot.comboBox().items();
+ int myIndex =0;
+ for (int index=0;index<versions.length;index++) {
+ if (version.equals(versions[index])) {
+ myIndex=index;
+ break;
+ }
+ }
+ bot.comboBox().setSelection(myIndex);
+ open.finish(bot.activeShell().bot());
+ }
open.finish(wiz, IDELabel.Button.OK);
}
+ public void removeESBRuntime(String name) {
+ SWTBot wiz = open.preferenceOpen(ActionItem.Preference.JBossToolsJBossESBRuntimes.LABEL);
+ SWTBotTable tbRuntimeEnvironments = bot.table();
+ int numRows = tbRuntimeEnvironments.rowCount();
+ if (numRows > 0) {
+ int currentRow = 0;
+ while (currentRow < numRows) {
+ if (tbRuntimeEnvironments.cell(currentRow, 1).equalsIgnoreCase(
+ name)) {
+ tbRuntimeEnvironments.click(currentRow, 1);
+ wiz.button(IDELabel.Button.REMOVE).click();
+ SWTBotShell shell = bot.shell("Confirm Runtime Delete");
+ shell.activate();
+ shell.bot().button(IDELabel.Button.OK).click();
+ log.info("ESB Runtime '" + name +"' removed.");
+ break;
+ } else {
+ currentRow++;
+ }
+ }
+ }
+ open.finish(wiz,IDELabel.Button.OK);
+ }
/**
* adds jboss server runtime only if it's not specified yet
*
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddServer.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddServer.java 2010-06-15 11:40:37 UTC (rev 22805)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddServer.java 2010-06-15 12:05:29 UTC (rev 22806)
@@ -38,6 +38,16 @@
@Override
public void handle() {
+
+ // handle state when server is already configured, but configuration changed and another
+ if (SWTTestExt.configuredState.getServer().isConfigured) {
+ if (SWTTestExt.configuredState.getServer().type!=TestConfigurator.currentConfig.getServer().type
+ ||SWTTestExt.configuredState.getServer().version!=TestConfigurator.currentConfig.getServer().version) {
+ createStopServer().handle();
+ createRemoveServer().handle();
+ }
+ }
+
ServerInfo serverInfo = getRuntime(TestConfigurator.currentConfig.getServer().type,TestConfigurator.currentConfig.getServer().version);
String runtimeHome=TestConfigurator.currentConfig.getServer().runtimeHome;
String runtimeName=TestConfigurator.currentConfig.getServer().type+"-"+TestConfigurator.currentConfig.getServer().version;
@@ -135,7 +145,9 @@
}
@Override
public boolean checkFulfilled() {
- return SWTTestExt.configuredState.getServer().isConfigured;
+ return SWTTestExt.configuredState.getServer().isConfigured
+ && SWTTestExt.configuredState.getServer().type.equals(TestConfigurator.currentConfig.getServer().type)
+ && SWTTestExt.configuredState.getServer().version.equals(TestConfigurator.currentConfig.getServer().version);
}
}
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/RemoveServer.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/RemoveServer.java 2010-06-15 11:40:37 UTC (rev 22805)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/RemoveServer.java 2010-06-15 12:05:29 UTC (rev 22806)
@@ -16,14 +16,15 @@
@Override
public void handle() {
- SWTTestExt.servers.deleteServer(SWTTestExt.configuredState.getServer().name);
- SWTTestExt.eclipse.removeServerRuntime(SWTTestExt.configuredState.getServer().name);
- SWTTestExt.configuredState.getServer().isConfigured=false;
- SWTTestExt.configuredState.getServer().name=null;
- SWTTestExt.configuredState.getServer().version=null;
- SWTTestExt.configuredState.getServer().type=null;
- SWTTestExt.configuredState.getServer().withJavaVersion=null;
- SWTTestExt.configuredState.getServer().bundledESBVersion=null;
+ if (!checkFulfilled()) {
+ SWTTestExt.servers.deleteServer(SWTTestExt.configuredState.getServer().name);
+ SWTTestExt.eclipse.removeServerRuntime(SWTTestExt.configuredState.getServer().name);
+ SWTTestExt.configuredState.getServer().isConfigured=false;
+ SWTTestExt.configuredState.getServer().name=null;
+ SWTTestExt.configuredState.getServer().version=null;
+ SWTTestExt.configuredState.getServer().type=null;
+ SWTTestExt.configuredState.getServer().withJavaVersion=null;
+ SWTTestExt.configuredState.getServer().bundledESBVersion=null;
+ }
}
-
}
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/StartServer.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/StartServer.java 2010-06-15 11:40:37 UTC (rev 22805)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/StartServer.java 2010-06-15 12:05:29 UTC (rev 22806)
@@ -9,7 +9,7 @@
public class StartServer extends RequirementBase {
public StartServer() {
- // define dependency
+ // define dependency
getDependsOn().add(createAddServer());
}
@@ -20,7 +20,7 @@
@Override
public void handle(){
- if (!SWTTestExt.configuredState.getServer().isRunning){
+ if (!checkFulfilled()){
SWTTestExt.servers.startServer(SWTTestExt.configuredState.getServer().name);
SWTTestExt.configuredState.getServer().isRunning = true;
}
14 years, 7 months
JBoss Tools SVN: r22805 - trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2010-06-15 07:40:37 -0400 (Tue, 15 Jun 2010)
New Revision: 22805
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfiguration.java
Log:
https://jira.jboss.org/browse/JBIDE-6403 - revert change related with thread current class loader back
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfiguration.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfiguration.java 2010-06-15 08:31:27 UTC (rev 22804)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfiguration.java 2010-06-15 11:40:37 UTC (rev 22805)
@@ -235,7 +235,10 @@
}
protected ClassLoader getParentClassLoader() {
- return ConsoleConfiguration.class.getClassLoader();
+ //Thread.currentThread().setContextClassLoader(ClassLoader.getSystemClassLoader());
+ ClassLoader cl = Thread.currentThread().getContextClassLoader();
+ //ClassLoader cl = ConsoleConfiguration.class.getClassLoader();
+ return cl;
}
public Configuration getConfiguration() {
14 years, 7 months
JBoss Tools SVN: r22804 - trunk/jst/plugins/org.jboss.tools.jst.web.kb.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2010-06-15 04:31:27 -0400 (Tue, 15 Jun 2010)
New Revision: 22804
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/plugin.xml
Log:
fix for JSF validation facet context type required new jsf.facet content type to be able validate xhtml files
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/plugin.xml
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/plugin.xml 2010-06-15 05:35:11 UTC (rev 22803)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/plugin.xml 2010-06-15 08:31:27 UTC (rev 22804)
@@ -89,6 +89,7 @@
<contexttype id="FACELETS_PAGE_CONTEXT_TYPE">
<contenttype id="org.eclipse.wst.html.core.htmlsource" />
+ <contenttype id="jsf.facelet" />
</contexttype>
<contexttype id="XML_PAGE_CONTEXT_TYPE">
@@ -131,7 +132,7 @@
<extension
point="org.eclipse.wst.validation.validator"
- id="KbValidator"
+ id="cd"
name="JBoss KB Project Validator">
<validator>
<projectNature id="org.eclipse.jdt.core.javanature" />
@@ -212,4 +213,4 @@
</catalogContribution>
</extension>
-</plugin>
\ No newline at end of file
+</plugin>
14 years, 7 months
JBoss Tools SVN: r22803 - trunk/build/target-platform.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-06-15 01:35:11 -0400 (Tue, 15 Jun 2010)
New Revision: 22803
Modified:
trunk/build/target-platform/e36-wtp32.target
trunk/build/target-platform/install.xml
trunk/build/target-platform/target2ant.xsl
Log:
https://jira.jboss.org/browse/JBDS-1247 refactoring + generate update site + metadata + run p2.director
Modified: trunk/build/target-platform/e36-wtp32.target
===================================================================
--- trunk/build/target-platform/e36-wtp32.target 2010-06-14 23:32:48 UTC (rev 22802)
+++ trunk/build/target-platform/e36-wtp32.target 2010-06-15 05:35:11 UTC (rev 22803)
@@ -24,6 +24,15 @@
<repository location="http://m2eclipse.sonatype.org/sites/m2e-extras/"/>
</location>
<location includeAllPlatforms="false" includeMode="planner" type="InstallableUnit">
+<repository location="http://eclipse.svnkit.com/1.3.x/"/>
+</location>
+<location includeAllPlatforms="false" includeMode="planner" type="InstallableUnit">
+<repository location="http://www.polarion.org/projects/subversive/download/eclipse/2.0/update-s..."/>
+</location>
+<location includeAllPlatforms="false" includeMode="planner" type="InstallableUnit">
+<repository location="http://download.eclipse.org/technology/subversive/0.7/update-site/"/>
+</location>
+<location includeAllPlatforms="false" includeMode="planner" type="InstallableUnit">
<unit id="javax.wsdl" version="1.6.2.v201005080631"/>
<repository location="http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/u..."/>
</location>
@@ -68,14 +77,12 @@
<unit id="org.eclipse.platform.ide" version="3.6.0.I20100603-1500"/>
<repository location="http://download.eclipse.org/eclipse/updates/3.6milestones/"/>
</location>
-<!--
-<location includeAllPlatforms="false" includeMode="planner" type="InstallableUnit">
-<repository location="http://download.eclipse.org/rt/ecf/3.2/3.6/site.p2"/>
-</location>
-<location includeAllPlatforms="false" includeMode="planner" type="InstallableUnit">
-<repository location="http://download.eclipse.org/modeling/emf/emf/updates/2.6/"/>
-</location>
--->
+<location includeAllPlatforms="false" includeMode="planner" type="InstallableUnit">
+<repository location="http://download.eclipse.org/rt/ecf/3.2/3.6/site.p2"/>
+</location>
+<location includeAllPlatforms="false" includeMode="planner" type="InstallableUnit">
+<repository location="http://download.eclipse.org/modeling/emf/emf/updates/2.6/"/>
+</location>
</locations>
<targetJRE path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
</target>
Modified: trunk/build/target-platform/install.xml
===================================================================
--- trunk/build/target-platform/install.xml 2010-06-14 23:32:48 UTC (rev 22802)
+++ trunk/build/target-platform/install.xml 2010-06-15 05:35:11 UTC (rev 22803)
@@ -1,24 +1,40 @@
<project default="run" basedir="." name="Install a target platform into local Eclipse">
<!-- To fetch a number of features remote repo(s) and mirror them locally, run this in target/platform dir:
- ~/eclipse/36clean/eclipse/eclipse -nosplash -data /tmp/workspace -consolelog \
- -application org.eclipse.ant.core.antRunner -f install.xml \
- -Dtarget.to.install=e36-wtp32.target \
- -Declipse.install.dir=/path/to/install/dir | tee log.txt
+ ~/eclipse/36clean/eclipse/eclipse -vm /opt/sun-java2-6.0/bin/java -nosplash \
+ -data /tmp/workspace -consolelog -application org.eclipse.ant.core.antRunner \
+ -f ./install.xml \
+ -Dtarget.to.install=e36-wtp32.target \
+ -Drepo.dir=/tmp/p2.mirror \
+ -Dinstall.dir=/home/nboldt/eclipse/36clean2/eclipse \
+ | tee log.txt
+
+ ALTERNATIVE PLAN:
+
+ generate metadata (content.xml) for file:/home/nboldt/eclipse/workspace-clean36/.metadata/.plugins/org.eclipse.pde.core/.bundle_pool/
+ install from there (already on disk)
-->
- <!-- what target file should be installed? -->
+ <!-- what target file to be installed -->
<property name="target.to.install" value="e36-wtp32.target" />
- <!-- where should this target be installed? Into ${eclipse.home} or /path/to/eclipse -->
- <!-- <property name="eclipse.install.dir" value="${eclipse.home}" /> -->
- <property name="eclipse.install.dir" value="/home/nboldt/eclipse/36clean2/eclipse" />
+ <!-- where to download and create mirror repo -->
+ <property name="repo.dir" value="/tmp/p2.mirror" />
- <target name="init" unless="eclipse.install.dir">
- <fail>Must set -Declipse.install.dir=/path/to/install/</fail>
+ <!-- where to install target: into ${eclipse.home} or /path/to/eclipse -->
+ <!-- <property name="install.dir" value="${eclipse.home}" /> -->
+ <!-- <property name="install.dir" value="/home/nboldt/eclipse/36clean2/eclipse" /> -->
+
+ <target name="init" unless="install.dir">
+ <fail>Must set these properties:
+ -Dtarget.to.install=e36-wtp32.target
+ -Drepo.dir=/tmp/p2.mirror
+ -Dinstall.dir=/home/nboldt/eclipse/36clean2/eclipse
+</fail>
</target>
- <target name="run" depends="init" if="eclipse.install.dir">
+ <target name="run" depends="init" if="install.dir">
+ <mkdir dir="${repo.dir}" />
<!-- create p2.mirror ant script -->
<property name="mirror" value="p2.mirror.xml" />
@@ -26,13 +42,128 @@
<!-- run generated p2.mirror ant script -->
<ant antfile="p2.mirror.xml">
- <property name="eclipse.install.dir" value="${eclipse.install.dir}" />
+ <property name="repo.dir" value="${repo.dir}" />
</ant>
+ <!-- generate a site.xml for all the features available -->
+ <antcall target="buildSiteXml" />
+
+ <!-- generate metadata -->
+ <!-- TODO: switch to use Publisher: http://wiki.eclipse.org/Equinox/p2/Publisher#Features_and_Bundles_Publish...
+ <p2.publish.featuresAndBundles
+ metadataRepository="file:/repository/location"
+ artifactRepository="file:/repository/location"
+ publishArtifacts="true"
+ compress="true"
+ source="/bundles/and/features/location/">
+ -->
+ <java classname="org.eclipse.equinox.launcher.Main"
+ fork="true"
+ timeout="10800000"
+ jvm="${java.home}/bin/java"
+ failonerror="false"
+ maxmemory="512m"
+ taskname="p2"
+ >
+ <classpath>
+ <fileset dir="${eclipse.home}/plugins"
+ includes="org.eclipse.equinox.launcher_*.jar, org.eclipse.equinox.p2.metadata.generator_*.jar"
+ />
+ <pathelement location="${eclipse.home}/plugins" />
+ </classpath>
+ <arg line="-application org.eclipse.equinox.p2.metadata.generator.EclipseGenerator" />
+ <arg line=" -updateSite ${repo.dir}/ -site file:${repo.dir}/site.xml" />
+ <arg line="-metadataRepository file://${repo.dir} -metadataRepositoryName "Local Mirror Repo"" />
+ <arg line="-artifactRepository file://${repo.dir} -artifactRepositoryName "Local Mirror Artifacts""
+ />
+ <arg line="-compress -noDefaultIUs -reusePack200Files" />
+ </java>
+
<!-- cleanup -->
<delete file="${mirror}" quiet="true" />
- <!-- TODO: run p2.director to install from mirror into eclipse -->
+ <!-- run p2.director to install from repo.dir into install.dir -->
+ <chmod perm="+x" file="${eclipse.home}/eclipse" />
+ <exec executable="${eclipse.home}/eclipse"
+ failonerror="true"
+ dir="${eclipse.home}"
+ timeout="900000"
+ taskname="p2.dir"
+ >
+ <arg line=" -vm ${java.home}/bin/java" />
+ <arg line=" -application org.eclipse.equinox.p2.director" />
+ <arg line=" -nosplash --launcher.suppressErrors -consoleLog -flavor tooling -roaming -profile SDKProfile" />
+ <!-- <arg line=" -installIU ... -installIU ... " /> -->
+ <arg line=" -destination ${install.dir} -bundlepool ${install.dir}" />
+ <arg line=" -metadataRepository file://${repo.dir} -artifactRepository file://${repo.dir}" />
+ <arg line=" -profileProperties org.eclipse.update.install.features=true" />
+ <arg line=" -vmargs -Declipse.p2.data.area=${install.dir}/p2 -Declipse.p2.MD5Check=false" />
+ </exec>
+ </target>
+ <target name="buildSiteXml" description="Generate a site.xml to contain the features in a category">
+ <echo level="info">Generating site.xml for use with p2 repo / update site categories...</echo>
+ <echo file="${repo.dir}/site.xml"><?xml version="1.0" encoding="UTF-8"?></echo>
+ <if>
+ <equals arg1="${pack200Files}" arg2="-reusePack200Files" />
+ <then>
+ <echo append="true" file="${repo.dir}/site.xml"><site pack200="true"></echo>
+ </then>
+ <else>
+ <echo append="true" file="${repo.dir}/site.xml"><site></echo>
+ </else>
+ </if>
+
+ <property name="category.name" value="Subversive Repo" />
+
+ <echo append="true" file="${repo.dir}/site.xml"> <description>To install these features, point Eclipse at this site.</description>
+
+ <!-- ${category.name} -->
+ <category-def label="${category.name}" name="${category.name}">
+ <description>${category.name}: contains all features in this build.</description>
+ </category-def>
+ </echo>
+
+ <for param="featureJar">
+ <path>
+ <fileset dir="${repo.dir}/features" includes="*.jar" />
+ </path>
+ <sequential>
+ <var name="feature.jarfile" unset="true" />
+ <var name="feature.id" unset="true" />
+ <var name="feature.version" unset="true" />
+ <propertyregex property="feature.jarfile"
+ defaultvalue="@{featureJar}"
+ input="@{featureJar}"
+ regexp=".+/features/([^/]+\.jar)"
+ replace="\1"
+ override="true"
+ />
+ <propertyregex property="feature.id"
+ defaultvalue="${feature.jarfile}"
+ input="${feature.jarfile}"
+ regexp="([^_]+)_(\d+\.\d+\.\d+\..+)\.jar"
+ replace="\1"
+ override="true"
+ />
+ <propertyregex property="feature.version"
+ defaultvalue="${feature.jarfile}"
+ input="${feature.jarfile}"
+ regexp="([^_]+)_(\d+\.\d+\.\d+\..+)\.jar"
+ replace="\2"
+ override="true"
+ />
+ <echo append="true" file="${repo.dir}/site.xml"> <feature id="${feature.id}" version="${feature.version}" url="features/${feature.jarfile}" patch="false">
+ <category name="${category.name}"/>
+ </feature>
+ </echo>
+ <var name="feature.jarfile" unset="true" />
+ <var name="feature.id" unset="true" />
+ <var name="feature.version" unset="true" />
+ </sequential>
+ </for>
+ <echo append="true" file="${repo.dir}/site.xml">
+ </site>
+ </echo>
</target>
</project>
Modified: trunk/build/target-platform/target2ant.xsl
===================================================================
--- trunk/build/target-platform/target2ant.xsl 2010-06-14 23:32:48 UTC (rev 22802)
+++ trunk/build/target-platform/target2ant.xsl 2010-06-15 05:35:11 UTC (rev 22803)
@@ -1,46 +1,44 @@
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- version="2.0">
- <!-- TODO: ? make p2.mirror step a single operation w/ a long list of IUs
- pulled from a list of sites, rather than from each site
- -->
- <xsl:output method="xml" indent="yes" />
+ version="1.0">
+ <xsl:output method="xml" indent="yes" encoding="UTF-8"
+ version="1.0" />
<xsl:decimal-format decimal-separator="."
grouping-separator="," />
<xsl:param name="verbose" select="'false'" />
- <xsl:param name="destination" select="'file:${eclipse.install.dir}'" />
+ <xsl:param name="destination" select="'file:${repo.dir}'" />
<xsl:variable name="platformFilter"
select="concat(/target/environment/os/text(), ',', /target/environment/ws/text(), ',', /target/environment/arch/text())" />
<xsl:template match="target">
- <project name="Install target platform" default="install.target.platform">
+ <project name="Download target platform" default="download.target.platform">
<!-- use followStrict="true" to prevent downloading all requirements not
included in the target platform or followStrict="false" to fetch everything -->
- <target name="init" unless="eclipse.install.dir">
- <fail>Must set -Declipse.install.dir=/path/to/install/</fail>
+ <target name="init" unless="repo.dir">
+ <fail>Must set -Drepo.dir=/path/to/download/artifacts/</fail>
</target>
- <target name="install.target.platform" depends="init"
- description="Install from target platform definition" if="eclipse.install.dir">
- <echo>Install features/plugins into ${eclipse.install.dir}</echo>
- <xsl:apply-templates />
+ <target name="download.target.platform" depends="init"
+ description="Download from target platform definition" if="repo.dir">
+ <echo level="info">Download features/plugins into ${repo.dir}</echo>
+ <p2.mirror destination="{$destination}" verbose="{$verbose}">
+ <slicingOptions includeFeatures="true" followStrict="false" />
+ <source>
+ <xsl:apply-templates select="//repository" />
+ </source>
+ <xsl:apply-templates select="//unit" />
+ </p2.mirror>
</target>
</project>
</xsl:template>
- <xsl:template match="location">
- <xsl:variable name="locationUrl" select="./repository/@location" />
- <p2.mirror destination="{$destination}" verbose="{$verbose}">
- <slicingOptions includeFeatures="true" followStrict="false" />
- <source>
- <repository location="{$locationUrl}" />
- </source>
- <xsl:apply-templates />
- </p2.mirror>
+ <xsl:template match="//repository">
+ <xsl:variable name="locationUrl" select="./@location" />
+ <repository location="{$locationUrl}" />
</xsl:template>
- <xsl:template match="unit">
+ <xsl:template match="//unit">
<iu id="{@id}" version="{@version}" />
</xsl:template>
14 years, 7 months
JBoss Tools SVN: r22802 - trunk/build/target-platform.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-06-14 19:32:48 -0400 (Mon, 14 Jun 2010)
New Revision: 22802
Added:
trunk/build/target-platform/install.xml
Removed:
trunk/build/target-platform/build.xml
Log:
https://jira.jboss.org/browse/JBDS-1247 rename to install.xml and add TODO re: p2.director to do installation (rather than just a p2 repo mirror)
Deleted: trunk/build/target-platform/build.xml
===================================================================
--- trunk/build/target-platform/build.xml 2010-06-14 23:28:55 UTC (rev 22801)
+++ trunk/build/target-platform/build.xml 2010-06-14 23:32:48 UTC (rev 22802)
@@ -1,33 +0,0 @@
-<project default="run" basedir="." name="Install a target platform into local Eclipse">
- <!-- To fetch a number of features remote repo(s) and mirror them locally, run this in target/platform dir:
-
- ~/eclipse/36clean/eclipse/eclipse -nosplash -data /tmp/workspace -consolelog \
- -application org.eclipse.ant.core.antRunner -f build.xml | tee log.txt
- -->
-
- <!-- what target file should be installed? -->
- <property name="target.to.install" value="e36-wtp32.target" />
-
- <!-- where should this target be installed? Into ${eclipse.home} or /path/to/eclipse -->
- <!-- <property name="eclipse.install.dir" value="${eclipse.home}" /> -->
- <property name="eclipse.install.dir" value="/home/nboldt/eclipse/36clean2/eclipse" />
-
- <target name="init" unless="eclipse.install.dir">
- <fail>Must set -Declipse.install.dir=/path/to/install/</fail>
- </target>
-
- <target name="run" depends="init" if="eclipse.install.dir">
-
- <!-- create p2.mirror ant script -->
- <property name="mirror" value="p2.mirror.xml" />
- <xslt style="target2ant.xsl" in="${target.to.install}" out="${mirror}" force="true" />
-
- <!-- run generated p2.mirror ant script -->
- <ant antfile="p2.mirror.xml">
- <property name="eclipse.install.dir" value="${eclipse.install.dir}" />
- </ant>
-
- <!-- cleanup -->
- <delete file="${mirror}" quiet="true" />
- </target>
-</project>
Copied: trunk/build/target-platform/install.xml (from rev 22801, trunk/build/target-platform/build.xml)
===================================================================
--- trunk/build/target-platform/install.xml (rev 0)
+++ trunk/build/target-platform/install.xml 2010-06-14 23:32:48 UTC (rev 22802)
@@ -0,0 +1,38 @@
+<project default="run" basedir="." name="Install a target platform into local Eclipse">
+ <!-- To fetch a number of features remote repo(s) and mirror them locally, run this in target/platform dir:
+
+ ~/eclipse/36clean/eclipse/eclipse -nosplash -data /tmp/workspace -consolelog \
+ -application org.eclipse.ant.core.antRunner -f install.xml \
+ -Dtarget.to.install=e36-wtp32.target \
+ -Declipse.install.dir=/path/to/install/dir | tee log.txt
+ -->
+
+ <!-- what target file should be installed? -->
+ <property name="target.to.install" value="e36-wtp32.target" />
+
+ <!-- where should this target be installed? Into ${eclipse.home} or /path/to/eclipse -->
+ <!-- <property name="eclipse.install.dir" value="${eclipse.home}" /> -->
+ <property name="eclipse.install.dir" value="/home/nboldt/eclipse/36clean2/eclipse" />
+
+ <target name="init" unless="eclipse.install.dir">
+ <fail>Must set -Declipse.install.dir=/path/to/install/</fail>
+ </target>
+
+ <target name="run" depends="init" if="eclipse.install.dir">
+
+ <!-- create p2.mirror ant script -->
+ <property name="mirror" value="p2.mirror.xml" />
+ <xslt style="target2ant.xsl" in="${target.to.install}" out="${mirror}" force="true" />
+
+ <!-- run generated p2.mirror ant script -->
+ <ant antfile="p2.mirror.xml">
+ <property name="eclipse.install.dir" value="${eclipse.install.dir}" />
+ </ant>
+
+ <!-- cleanup -->
+ <delete file="${mirror}" quiet="true" />
+
+ <!-- TODO: run p2.director to install from mirror into eclipse -->
+
+ </target>
+</project>
Property changes on: trunk/build/target-platform/install.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
14 years, 7 months
JBoss Tools SVN: r22801 - trunk/build/target-platform.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-06-14 19:28:55 -0400 (Mon, 14 Jun 2010)
New Revision: 22801
Added:
trunk/build/target-platform/build.xml
Log:
https://jira.jboss.org/browse/JBDS-1247 script to run xslt and then perform p2.mirror operation; must be run w/ Eclipse AntRunner
Added: trunk/build/target-platform/build.xml
===================================================================
--- trunk/build/target-platform/build.xml (rev 0)
+++ trunk/build/target-platform/build.xml 2010-06-14 23:28:55 UTC (rev 22801)
@@ -0,0 +1,33 @@
+<project default="run" basedir="." name="Install a target platform into local Eclipse">
+ <!-- To fetch a number of features remote repo(s) and mirror them locally, run this in target/platform dir:
+
+ ~/eclipse/36clean/eclipse/eclipse -nosplash -data /tmp/workspace -consolelog \
+ -application org.eclipse.ant.core.antRunner -f build.xml | tee log.txt
+ -->
+
+ <!-- what target file should be installed? -->
+ <property name="target.to.install" value="e36-wtp32.target" />
+
+ <!-- where should this target be installed? Into ${eclipse.home} or /path/to/eclipse -->
+ <!-- <property name="eclipse.install.dir" value="${eclipse.home}" /> -->
+ <property name="eclipse.install.dir" value="/home/nboldt/eclipse/36clean2/eclipse" />
+
+ <target name="init" unless="eclipse.install.dir">
+ <fail>Must set -Declipse.install.dir=/path/to/install/</fail>
+ </target>
+
+ <target name="run" depends="init" if="eclipse.install.dir">
+
+ <!-- create p2.mirror ant script -->
+ <property name="mirror" value="p2.mirror.xml" />
+ <xslt style="target2ant.xsl" in="${target.to.install}" out="${mirror}" force="true" />
+
+ <!-- run generated p2.mirror ant script -->
+ <ant antfile="p2.mirror.xml">
+ <property name="eclipse.install.dir" value="${eclipse.install.dir}" />
+ </ant>
+
+ <!-- cleanup -->
+ <delete file="${mirror}" quiet="true" />
+ </target>
+</project>
Property changes on: trunk/build/target-platform/build.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
14 years, 7 months
JBoss Tools SVN: r22800 - trunk/build/target-platform.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-06-14 19:28:09 -0400 (Mon, 14 Jun 2010)
New Revision: 22800
Added:
trunk/build/target-platform/target2ant.xsl
Log:
https://jira.jboss.org/browse/JBDS-1247 xslt script to convert from .target to p2.mirror script; TODO? make p2.mirror step a single operation w/ a long list of IUs pulled from a list of sites, rather than from each site
Added: trunk/build/target-platform/target2ant.xsl
===================================================================
--- trunk/build/target-platform/target2ant.xsl (rev 0)
+++ trunk/build/target-platform/target2ant.xsl 2010-06-14 23:28:09 UTC (rev 22800)
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="2.0">
+ <!-- TODO: ? make p2.mirror step a single operation w/ a long list of IUs
+ pulled from a list of sites, rather than from each site
+ -->
+ <xsl:output method="xml" indent="yes" />
+ <xsl:decimal-format decimal-separator="."
+ grouping-separator="," />
+
+ <xsl:param name="verbose" select="'false'" />
+ <xsl:param name="destination" select="'file:${eclipse.install.dir}'" />
+
+ <xsl:variable name="platformFilter"
+ select="concat(/target/environment/os/text(), ',', /target/environment/ws/text(), ',', /target/environment/arch/text())" />
+
+ <xsl:template match="target">
+ <project name="Install target platform" default="install.target.platform">
+ <!-- use followStrict="true" to prevent downloading all requirements not
+ included in the target platform or followStrict="false" to fetch everything -->
+ <target name="init" unless="eclipse.install.dir">
+ <fail>Must set -Declipse.install.dir=/path/to/install/</fail>
+ </target>
+ <target name="install.target.platform" depends="init"
+ description="Install from target platform definition" if="eclipse.install.dir">
+ <echo>Install features/plugins into ${eclipse.install.dir}</echo>
+ <xsl:apply-templates />
+ </target>
+ </project>
+ </xsl:template>
+
+ <xsl:template match="location">
+ <xsl:variable name="locationUrl" select="./repository/@location" />
+ <p2.mirror destination="{$destination}" verbose="{$verbose}">
+ <slicingOptions includeFeatures="true" followStrict="false" />
+ <source>
+ <repository location="{$locationUrl}" />
+ </source>
+ <xsl:apply-templates />
+ </p2.mirror>
+ </xsl:template>
+
+ <xsl:template match="unit">
+ <iu id="{@id}" version="{@version}" />
+ </xsl:template>
+
+ <!-- ignore anything else -->
+ <xsl:template match="environment|targetJRE|launcherArgs|includeBundles" />
+
+</xsl:stylesheet>
\ No newline at end of file
Property changes on: trunk/build/target-platform/target2ant.xsl
___________________________________________________________________
Name: svn:mime-type
+ text/plain
14 years, 7 months