catch up with fixes in 3.6 M3
diff --git a/ant/org.eclipse.ant.tests.ui/Ant Debug Tests/org/eclipse/ant/tests/ui/debug/AbstractAntDebugTest.java b/ant/org.eclipse.ant.tests.ui/Ant Debug Tests/org/eclipse/ant/tests/ui/debug/AbstractAntDebugTest.java index 613d4e7..6eef4cb 100644 --- a/ant/org.eclipse.ant.tests.ui/Ant Debug Tests/org/eclipse/ant/tests/ui/debug/AbstractAntDebugTest.java +++ b/ant/org.eclipse.ant.tests.ui/Ant Debug Tests/org/eclipse/ant/tests/ui/debug/AbstractAntDebugTest.java
@@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2006 IBM Corporation and others. + * Copyright (c) 2000, 2009 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -34,6 +34,8 @@ import org.eclipse.debug.core.model.IProcess; import org.eclipse.debug.core.model.IThread; import org.eclipse.debug.internal.ui.DebugUIPlugin; +import org.eclipse.debug.internal.ui.IInternalDebugUIConstants; +import org.eclipse.debug.internal.ui.preferences.IDebugPreferenceConstants; import org.eclipse.debug.ui.DebugUITools; import org.eclipse.debug.ui.IDebugUIConstants; import org.eclipse.jdt.core.ICompilationUnit; @@ -41,6 +43,7 @@ import org.eclipse.jdt.core.IJavaProject; import org.eclipse.jdt.core.IPackageFragmentRoot; import org.eclipse.jface.dialogs.ErrorDialog; +import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.jface.text.BadPositionCategoryException; import org.eclipse.jface.text.IDocument; import org.eclipse.jface.text.Position; @@ -521,7 +524,8 @@ } } debugTarget.terminate(); - waiter.waitForEvent(); + Object event = waiter.waitForEvent(); + assertNotNull("No terminate event was recieved", event); getLaunchManager().removeLaunch(debugTarget.getLaunch()); } catch (CoreException e) { } @@ -530,7 +534,8 @@ // ensure event queue is flushed DebugEventWaiter waiter = new DebugElementEventWaiter(DebugEvent.MODEL_SPECIFIC, this); DebugPlugin.getDefault().fireDebugEventSet(new DebugEvent[]{new DebugEvent(this, DebugEvent.MODEL_SPECIFIC)}); - waiter.waitForEvent(); + Object event = waiter.waitForEvent(); + assertNotNull("The model specific event was never recieved", event); } /** @@ -722,11 +727,41 @@ IResource r = p.getFolder(root); return project.getPackageFragmentRoot(r).getPackageFragment(pkg).getCompilationUnit(name); } - + + /** + * Sets the current set of Debug / Other preferences to use during each test + * + * @since 3.5 + */ + protected void setPreferences() { + IPreferenceStore debugUIPreferences = DebugUIPlugin.getDefault().getPreferenceStore(); + String property = System.getProperty("debug.workbenchActivation"); + boolean activate = property != null && property.equals("on"); + debugUIPreferences.setValue(IDebugPreferenceConstants.CONSOLE_OPEN_ON_ERR, activate); + debugUIPreferences.setValue(IDebugPreferenceConstants.CONSOLE_OPEN_ON_OUT, activate); + debugUIPreferences.setValue(IInternalDebugUIConstants.PREF_ACTIVATE_DEBUG_VIEW, activate); + debugUIPreferences.setValue(IDebugUIConstants.PREF_ACTIVATE_WORKBENCH, activate); + } + + /* (non-Javadoc) + * @see junit.framework.TestCase#tearDown() + */ + protected void tearDown() throws Exception { + //reset the options + IPreferenceStore debugUIPreferences = DebugUIPlugin.getDefault().getPreferenceStore(); + debugUIPreferences.setToDefault(IDebugPreferenceConstants.CONSOLE_OPEN_ON_ERR); + debugUIPreferences.setToDefault(IDebugPreferenceConstants.CONSOLE_OPEN_ON_OUT); + debugUIPreferences.setToDefault(IInternalDebugUIConstants.PREF_ACTIVATE_DEBUG_VIEW); + debugUIPreferences.setToDefault(IDebugUIConstants.PREF_ACTIVATE_WORKBENCH); + super.tearDown(); + } + /* (non-Javadoc) * @see junit.framework.TestCase#setUp() */ protected void setUp() throws Exception { + super.setUp(); + setPreferences(); DebugUIPlugin.getStandardDisplay().syncExec(new Runnable() { public void run() { IWorkbench workbench = PlatformUI.getWorkbench();
diff --git a/ant/org.eclipse.ant.tests.ui/Ant Debug Tests/org/eclipse/ant/tests/ui/debug/BreakpointTests.java b/ant/org.eclipse.ant.tests.ui/Ant Debug Tests/org/eclipse/ant/tests/ui/debug/BreakpointTests.java index 32191ac..28e5214 100644 --- a/ant/org.eclipse.ant.tests.ui/Ant Debug Tests/org/eclipse/ant/tests/ui/debug/BreakpointTests.java +++ b/ant/org.eclipse.ant.tests.ui/Ant Debug Tests/org/eclipse/ant/tests/ui/debug/BreakpointTests.java
@@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2006 IBM Corporation and others. + * Copyright (c) 2000, 2009 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -15,7 +15,7 @@ import org.eclipse.ant.internal.launching.debug.model.AntDebugTarget; import org.eclipse.ant.internal.launching.debug.model.AntThread; -import org.eclipse.ant.internal.ui.launchConfigurations.IAntLaunchConfigurationConstants; +import org.eclipse.ant.launching.IAntLaunchConstants; import org.eclipse.core.resources.IFile; import org.eclipse.core.runtime.CoreException; import org.eclipse.debug.core.DebugException; @@ -116,7 +116,7 @@ } ILaunchConfiguration config= getLaunchConfiguration(fileName); ILaunchConfigurationWorkingCopy copy= config.getWorkingCopy(); - copy.setAttribute(IAntLaunchConfigurationConstants.ATTR_ANT_TARGETS, "entry1,entry2"); + copy.setAttribute(IAntLaunchConstants.ATTR_ANT_TARGETS, "entry1,entry2"); thread= launchToLineBreakpoint(copy, bp); bp.setEnabled(false); if (sepVM) { @@ -200,7 +200,7 @@ } ILaunchConfiguration config= getLaunchConfiguration(fileName); ILaunchConfigurationWorkingCopy copy= config.getWorkingCopy(); - copy.setAttribute(IAntLaunchConfigurationConstants.ATTR_ANT_TARGETS, defaultTargetName); + copy.setAttribute(IAntLaunchConstants.ATTR_ANT_TARGETS, defaultTargetName); if (!sepVM) { Thread.sleep(3000); //TODO bug 121207: wait for previous launch to fully terminate }
diff --git a/ant/org.eclipse.ant.tests.ui/Ant Debug Tests/org/eclipse/ant/tests/ui/debug/PropertyTests.java b/ant/org.eclipse.ant.tests.ui/Ant Debug Tests/org/eclipse/ant/tests/ui/debug/PropertyTests.java index a3d937e..1d07a78 100644 --- a/ant/org.eclipse.ant.tests.ui/Ant Debug Tests/org/eclipse/ant/tests/ui/debug/PropertyTests.java +++ b/ant/org.eclipse.ant.tests.ui/Ant Debug Tests/org/eclipse/ant/tests/ui/debug/PropertyTests.java
@@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2007 IBM Corporation and others. + * Copyright (c) 2005, 2009 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -14,7 +14,7 @@ import org.eclipse.ant.internal.launching.debug.model.AntStackFrame; import org.eclipse.ant.internal.launching.debug.model.AntThread; import org.eclipse.ant.internal.launching.debug.model.AntValue; -import org.eclipse.ant.internal.ui.launchConfigurations.IAntLaunchConfigurationConstants; +import org.eclipse.ant.launching.IAntLaunchConstants; import org.eclipse.core.runtime.CoreException; import org.eclipse.debug.core.DebugException; import org.eclipse.debug.core.ILaunchConfiguration; @@ -48,7 +48,7 @@ } ILaunchConfiguration config= getLaunchConfiguration(fileName); ILaunchConfigurationWorkingCopy copy= config.getWorkingCopy(); - copy.setAttribute(IAntLaunchConfigurationConstants.ATTR_ANT_TARGETS, "properties"); + copy.setAttribute(IAntLaunchConstants.ATTR_ANT_TARGETS, "properties"); thread= launchToLineBreakpoint(copy, bp); AntStackFrame frame = (AntStackFrame)thread.getTopStackFrame(); @@ -82,7 +82,7 @@ } ILaunchConfiguration config= getLaunchConfiguration(fileName); ILaunchConfigurationWorkingCopy copy= config.getWorkingCopy(); - copy.setAttribute(IAntLaunchConfigurationConstants.ATTR_ANT_TARGETS, "properties"); + copy.setAttribute(IAntLaunchConstants.ATTR_ANT_TARGETS, "properties"); thread= launchToLineBreakpoint(copy, bp); AntStackFrame frame = (AntStackFrame)thread.getTopStackFrame(); @@ -118,7 +118,7 @@ } ILaunchConfiguration config= getLaunchConfiguration(fileName); ILaunchConfigurationWorkingCopy copy= config.getWorkingCopy(); - copy.setAttribute(IAntLaunchConfigurationConstants.ATTR_ANT_TARGETS, "properties"); + copy.setAttribute(IAntLaunchConstants.ATTR_ANT_TARGETS, "properties"); thread= launchToLineBreakpoint(copy, bp); AntStackFrame frame = (AntStackFrame)thread.getTopStackFrame();
diff --git a/ant/org.eclipse.ant.tests.ui/Ant Debug Tests/org/eclipse/ant/tests/ui/debug/RunToLineTests.java b/ant/org.eclipse.ant.tests.ui/Ant Debug Tests/org/eclipse/ant/tests/ui/debug/RunToLineTests.java index fc0730b..c8b826c 100644 --- a/ant/org.eclipse.ant.tests.ui/Ant Debug Tests/org/eclipse/ant/tests/ui/debug/RunToLineTests.java +++ b/ant/org.eclipse.ant.tests.ui/Ant Debug Tests/org/eclipse/ant/tests/ui/debug/RunToLineTests.java
@@ -1,11 +1,11 @@ /******************************************************************************* - * Copyright (c) 2005 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are 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 + * Copyright (c) 2005, 2009 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are 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: + * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package org.eclipse.ant.tests.ui.debug; @@ -201,8 +201,10 @@ }; DebugElementEventWaiter waiter = new DebugElementEventWaiter(DebugEvent.SUSPEND, thread); DebugUIPlugin.getStandardDisplay().syncExec(r); - waiter.waitForEvent(); + Object event = waiter.waitForEvent(); + assertNotNull("no suspend event was recieved", event); IStackFrame topStackFrame = thread.getTopStackFrame(); + assertNotNull("There must be a top stack frame", topStackFrame); assertEquals("wrong line", expectedLineNumber, topStackFrame.getLineNumber()); } finally { terminateAndRemove(thread);
diff --git a/ant/org.eclipse.ant.tests.ui/Ant Debug Tests/org/eclipse/ant/tests/ui/debug/StackTests.java b/ant/org.eclipse.ant.tests.ui/Ant Debug Tests/org/eclipse/ant/tests/ui/debug/StackTests.java index b7f1fe3..61f5a5d 100644 --- a/ant/org.eclipse.ant.tests.ui/Ant Debug Tests/org/eclipse/ant/tests/ui/debug/StackTests.java +++ b/ant/org.eclipse.ant.tests.ui/Ant Debug Tests/org/eclipse/ant/tests/ui/debug/StackTests.java
@@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2006 IBM Corporation and others. + * Copyright (c) 2005, 2009 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at
diff --git a/ant/org.eclipse.ant.tests.ui/Ant Debug Tests/org/eclipse/ant/tests/ui/debug/SteppingTests.java b/ant/org.eclipse.ant.tests.ui/Ant Debug Tests/org/eclipse/ant/tests/ui/debug/SteppingTests.java index 1dee1bb..e76d1a5 100644 --- a/ant/org.eclipse.ant.tests.ui/Ant Debug Tests/org/eclipse/ant/tests/ui/debug/SteppingTests.java +++ b/ant/org.eclipse.ant.tests.ui/Ant Debug Tests/org/eclipse/ant/tests/ui/debug/SteppingTests.java
@@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2006 IBM Corporation and others. + * Copyright (c) 2005, 2009 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at
diff --git a/ant/org.eclipse.ant.tests.ui/Ant Tests/org/eclipse/ant/tests/ui/performance/OpenLaunchConfigurationDialogTests.java b/ant/org.eclipse.ant.tests.ui/Ant Tests/org/eclipse/ant/tests/ui/performance/OpenLaunchConfigurationDialogTests.java index 5b997d9..e367813 100644 --- a/ant/org.eclipse.ant.tests.ui/Ant Tests/org/eclipse/ant/tests/ui/performance/OpenLaunchConfigurationDialogTests.java +++ b/ant/org.eclipse.ant.tests.ui/Ant Tests/org/eclipse/ant/tests/ui/performance/OpenLaunchConfigurationDialogTests.java
@@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2006 IBM Corporation and others. + * Copyright (c) 2004, 2009 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -14,7 +14,6 @@ import org.eclipse.ant.internal.ui.IAntUIConstants; import org.eclipse.ant.tests.ui.editor.performance.EditorTestHelper; import org.eclipse.ant.tests.ui.testplugin.AbstractAntUITest; -import org.eclipse.core.externaltools.internal.IExternalToolConstants; import org.eclipse.core.resources.IFile; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; @@ -27,6 +26,7 @@ import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.test.performance.Dimension; import org.eclipse.test.performance.PerformanceTestCase; +import org.eclipse.ui.externaltools.internal.model.IExternalToolConstants; public class OpenLaunchConfigurationDialogTests extends PerformanceTestCase {
diff --git a/ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/outline/AntEditorContentOutlinePage.java b/ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/outline/AntEditorContentOutlinePage.java index 8864e91..69728fe 100644 --- a/ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/outline/AntEditorContentOutlinePage.java +++ b/ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/outline/AntEditorContentOutlinePage.java
@@ -17,7 +17,6 @@ import java.util.List; -import org.apache.tools.ant.Target; import org.eclipse.ant.internal.ui.AntUIPlugin; import org.eclipse.ant.internal.ui.IAntUIConstants; import org.eclipse.ant.internal.ui.IAntUIPreferenceConstants; @@ -109,11 +108,7 @@ return false; } if (fFilterInternalTargets && node instanceof AntTargetNode) { - Target target= ((AntTargetNode)node).getTarget(); - if (target.getDescription() == null && !((AntTargetNode)node).isDefaultTarget()) { - return false; - } - return true; + return !((AntTargetNode)node).isInternal(); } if (fFilterProperties && node instanceof AntPropertyNode) { return false;
diff --git a/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/model/DebugModelMessages.java b/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/model/DebugModelMessages.java index 97debec..2452a1d 100644 --- a/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/model/DebugModelMessages.java +++ b/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/model/DebugModelMessages.java
@@ -1,12 +1,13 @@ -/********************************************************************** - * Copyright (c) 2004, 2005 IBM Corporation and others. All rights reserved. This - * program and the accompanying materials are 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: +/******************************************************************************* + * Copyright (c) 2004, 2009 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are 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: * IBM - Initial API and implementation - **********************************************************************/ + *******************************************************************************/ package org.eclipse.ant.internal.ui.debug.model; import org.eclipse.osgi.util.NLS;
diff --git a/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/model/DebugModelMessages.properties b/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/model/DebugModelMessages.properties index 6adbbac..373fbc1 100644 --- a/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/model/DebugModelMessages.properties +++ b/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/model/DebugModelMessages.properties
@@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2004, 2005 IBM Corporation and others. +# Copyright (c) 2004, 2009 IBM Corporation and others. # All rights reserved. This program and the accompanying materials # are made available under the terms of the Eclipse Public License v1.0 # which accompanies this distribution, and is available at
diff --git a/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntLaunchConfigurationMessages.properties b/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntLaunchConfigurationMessages.properties index 331d802..5a62681 100644 --- a/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntLaunchConfigurationMessages.properties +++ b/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntLaunchConfigurationMessages.properties
@@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2000, 2007 IBM Corporation and others. +# Copyright (c) 2000, 2009 IBM Corporation and others. # All rights reserved. This program and the accompanying materials # are made available under the terms of the Eclipse Public License v1.0 # which accompanies this distribution, and is available at
diff --git a/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntLaunchDelegate.java b/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntLaunchDelegate.java new file mode 100644 index 0000000..3995213 --- /dev/null +++ b/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntLaunchDelegate.java
@@ -0,0 +1,26 @@ +/******************************************************************************* + * Copyright (c) 2000, 2009 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are 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: + * IBM Corporation - initial API and implementation + * Juan A. Hernandez - bug 89926 + * dakshinamurthy.karra@gmail.com - bug 165371 + *******************************************************************************/ +package org.eclipse.ant.internal.ui.launchConfigurations; + + +/** + * <b>This class should no longer be used.</b> + * <p> + * Old launch delegate for Ant builds + * </p> + * @deprecated this class has been replaced with {@link org.eclipse.ant.internal.launching.launchConfigurations.AntLaunchDelegate} + * and is only present for backwards compatibility + */ +public class AntLaunchDelegate extends org.eclipse.ant.internal.launching.launchConfigurations.AntLaunchDelegate { + +}
diff --git a/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntLaunchShortcut.java b/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntLaunchShortcut.java index e01f352..d8389b0 100644 --- a/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntLaunchShortcut.java +++ b/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntLaunchShortcut.java
@@ -297,7 +297,7 @@ if (mode.equals(ILaunchManager.DEBUG_MODE)) { groupId= IDebugUIConstants.ID_DEBUG_LAUNCH_GROUP; } else { - groupId= IExternalToolConstants.ID_EXTERNAL_TOOLS_LAUNCH_GROUP; + groupId= org.eclipse.ui.externaltools.internal.model.IExternalToolConstants.ID_EXTERNAL_TOOLS_LAUNCH_GROUP; } DebugUITools.openLaunchConfigurationDialog(AntUIPlugin.getActiveWorkbenchWindow().getShell(), configuration, groupId, status); } else {
diff --git a/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/IAntLaunchConfigurationConstants.java b/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/IAntLaunchConfigurationConstants.java index c238547..869b9eb 100644 --- a/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/IAntLaunchConfigurationConstants.java +++ b/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/IAntLaunchConfigurationConstants.java
@@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2003, 2005 IBM Corporation and others. + * Copyright (c) 2003, 2009 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -12,7 +12,8 @@ package org.eclipse.ant.internal.ui.launchConfigurations; import org.eclipse.ant.launching.IAntLaunchConstants; -import org.eclipse.core.externaltools.internal.IExternalToolConstants; +import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants; +import org.eclipse.ui.externaltools.internal.model.IExternalToolConstants; /** * Constant definitions for Ant launch configurations. @@ -20,83 +21,98 @@ * Constant definitions only; not to be implemented. * </p> * @since 3.0 + * @noimplement This interface is not intended to be implemented by clients. + * @deprecated This interface has been replaced with {@link IAntLaunchConstants} */ public interface IAntLaunchConfigurationConstants { - // ------- Common Ant Launch Configuration Attributes ------- - /** - * String attribute indicating the Ant targets to execute. Default value is - * <code>null</code> which indicates that the default target is to be - * executed. Format is a comma separated listing of targets. - */ - public static final String ATTR_ANT_TARGETS = IAntLaunchConstants.ATTR_ANT_TARGETS; - - /** - * String attribute indicating the Ant targets to execute after a clean (full build) for an Ant builder. Default value is - * <code>null</code> which indicates that the default target is to be - * executed. Format is a comma separated listing of targets. - * @since 3.1 - */ - public static final String ATTR_ANT_AFTER_CLEAN_TARGETS = IAntLaunchConstants.ATTR_ANT_AFTER_CLEAN_TARGETS; - - /** - * String attribute indicating the Ant targets to execute during a manual build for an Ant builder. Default value is - * <code>null</code> which indicates that the default target is to be - * executed. Format is a comma separated listing of targets. - * @since 3.1 - */ - public static final String ATTR_ANT_MANUAL_TARGETS = IAntLaunchConstants.ATTR_ANT_MANUAL_TARGETS; - - /** - * String attribute indicating the Ant targets to execute during an auto build for an Ant builder. Default value is - * <code>null</code> which indicates that the default target is to be - * executed. Format is a comma separated listing of targets. - * @since 3.1 - */ - public static final String ATTR_ANT_AUTO_TARGETS = IAntLaunchConstants.ATTR_ANT_AUTO_TARGETS; - - /** - * String attribute indicating the Ant targets to execute during a clean for an Ant builder. Default value is - * <code>null</code> which indicates that the default target is to be - * executed. Format is a comma separated listing of targets. - * @since 3.1 - */ - public static final String ATTR_ANT_CLEAN_TARGETS = IAntLaunchConstants.ATTR_ANT_CLEAN_TARGETS; - - /** - * Boolean attribute indicating whether or not target specification for an Ant builder has been updated for - * 3.1 - * - * @since 3.1 - */ - public static final String ATTR_TARGETS_UPDATED = IAntLaunchConstants.ATTR_TARGETS_UPDATED; - - /** - * Map attribute indicating the Ant properties to be defined during the - * build. Default value is <code>null</code> which indicates no additional - * properties will be defined. - */ - public static final String ATTR_ANT_PROPERTIES = IAntLaunchConstants.ATTR_ANT_PROPERTIES; - /** - * String attribute indicating the Ant targets to execute. Default value is - * <code>null</code> which indicates that no additional property files - * will be defined. Format is a comma separated listing of property files. - */ - public static final String ATTR_ANT_PROPERTY_FILES = IAntLaunchConstants.ATTR_ANT_PROPERTY_FILES; /** * String attribute indicating the custom runtime classpath to use for an Ant * build. Default value is <code>null</code> which indicates that the global * classpath is to be used. Format is a comma separated listing of URLs. - * @deprecated no longer supported + * @deprecated no longer supported: use {@link IJavaLaunchConfigurationConstants#ATTR_CLASSPATH_PROVIDER} + * @see IJavaLaunchConfigurationConstants#ATTR_DEFAULT_CLASSPATH */ public static final String ATTR_ANT_CUSTOM_CLASSPATH = IExternalToolConstants.PLUGIN_ID + ".ATTR_ANT_CUSTOM_CLASSPATH"; //$NON-NLS-1$ /** * String attribute indicating the custom Ant home to use for an Ant build. * Default value is <code>null</code> which indicates that no Ant home is to * be set - * @deprecated no longer supported + * @deprecated no longer supported: use {@link IJavaLaunchConfigurationConstants#ATTR_CLASSPATH_PROVIDER} + * @see IJavaLaunchConfigurationConstants#ATTR_DEFAULT_CLASSPATH */ public static final String ATTR_ANT_HOME = IExternalToolConstants.PLUGIN_ID + ".ATTR_ANT_HOME"; //$NON-NLS-1$ + + + /** + * String attribute indicating the Ant targets to execute. Default value is + * <code>null</code> which indicates that the default target is to be + * executed. Format is a comma separated listing of targets. + * + * @deprecated This constant has been migrated to {@link org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants} + */ + public static final String ATTR_ANT_TARGETS = org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants.ATTR_ANT_TARGETS; + /** + * String attribute indicating the Ant targets to execute after a clean (full build) for an Ant builder. Default value is + * <code>null</code> which indicates that the default target is to be + * executed. Format is a comma separated listing of targets. + * @since 3.1 + * + * @deprecated This constant has been migrated to {@link org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants} + */ + public static final String ATTR_ANT_AFTER_CLEAN_TARGETS = org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants.ATTR_ANT_AFTER_CLEAN_TARGETS; + /** + * String attribute indicating the Ant targets to execute during a manual build for an Ant builder. Default value is + * <code>null</code> which indicates that the default target is to be + * executed. Format is a comma separated listing of targets. + * @since 3.1 + * + * @deprecated This constant has been migrated to {@link org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants} + */ + public static final String ATTR_ANT_MANUAL_TARGETS = org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants.ATTR_ANT_MANUAL_TARGETS; + /** + * String attribute indicating the Ant targets to execute during an auto build for an Ant builder. Default value is + * <code>null</code> which indicates that the default target is to be + * executed. Format is a comma separated listing of targets. + * @since 3.1 + * + * @deprecated This constant has been migrated to {@link org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants} + */ + public static final String ATTR_ANT_AUTO_TARGETS = org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants.ATTR_ANT_AUTO_TARGETS; + /** + * String attribute indicating the Ant targets to execute during a clean for an Ant builder. Default value is + * <code>null</code> which indicates that the default target is to be + * executed. Format is a comma separated listing of targets. + * @since 3.1 + * + * @deprecated This constant has been migrated to {@link org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants} + */ + public static final String ATTR_ANT_CLEAN_TARGETS = org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants.ATTR_ANT_CLEAN_TARGETS; + /** + * Boolean attribute indicating whether or not target specification for an Ant builder has been updated for + * 3.1 + * + * @since 3.1 + * + * @deprecated This constant has been migrated to {@link org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants} + */ + public static final String ATTR_TARGETS_UPDATED = org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants.ATTR_TARGETS_UPDATED; + /** + * Map attribute indicating the Ant properties to be defined during the + * build. Default value is <code>null</code> which indicates no additional + * properties will be defined. + * + * @deprecated This constant has been migrated to {@link org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants} + */ + public static final String ATTR_ANT_PROPERTIES = org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants.ATTR_ANT_PROPERTIES; + /** + * String attribute indicating the Ant targets to execute. Default value is + * <code>null</code> which indicates that no additional property files + * will be defined. Format is a comma separated listing of property files. + * + * @deprecated This constant has been migrated to {@link org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants} + */ + public static final String ATTR_ANT_PROPERTY_FILES = org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants.ATTR_ANT_PROPERTY_FILES; /** * Boolean attribute indicating whether or not internal targets (targets with no * description) should be hidden from the user in the launch configuration dialog. @@ -104,34 +120,39 @@ * displayed. * * @since 3.0 + * + * @deprecated This constant has been migrated to {@link org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants} */ - public static final String ATTR_HIDE_INTERNAL_TARGETS = IAntLaunchConstants.ATTR_HIDE_INTERNAL_TARGETS; + public static final String ATTR_HIDE_INTERNAL_TARGETS = org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants.ATTR_HIDE_INTERNAL_TARGETS; /** * Integer attribute indicating which column targets should be sorted on. A * value of 0 indicates target name, 1 indicates target description, and -1 * indicates no sort. Default value is -1. * * @since 3.0 + * + * @deprecated This constant has been migrated to {@link org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants} */ - public static final String ATTR_SORT_TARGETS = IAntLaunchConstants.ATTR_SORT_TARGETS; - - - // ------- Launch configuration types -------- + public static final String ATTR_SORT_TARGETS = org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants.ATTR_SORT_TARGETS; /** * Ant launch configuration type identifier. + * + * @deprecated This constant has been migrated to {@link org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants} */ - public static final String ID_ANT_LAUNCH_CONFIGURATION_TYPE = IAntLaunchConstants.ID_ANT_LAUNCH_CONFIGURATION_TYPE; - + public static final String ID_ANT_LAUNCH_CONFIGURATION_TYPE = org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants.ID_ANT_LAUNCH_CONFIGURATION_TYPE; /** * Ant builder launch configuration type identifier. Ant project builders * are of this type. + * + * @deprecated This constant has been migrated to {@link org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants} */ - public static final String ID_ANT_BUILDER_LAUNCH_CONFIGURATION_TYPE = IAntLaunchConstants.ID_ANT_BUILDER_LAUNCH_CONFIGURATION_TYPE; - + public static final String ID_ANT_BUILDER_LAUNCH_CONFIGURATION_TYPE = org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants.ID_ANT_BUILDER_LAUNCH_CONFIGURATION_TYPE; /** * Identifier for Ant processes (value <code>org.eclipse.ant.ui.antProcess</code>). This identifier is * set as the value for the <code>IProcess.ATTR_PROCESS_TYPE</code> * attribute in processes created by the Ant launch delegate. + * + * @deprecated This constant has been migrated to {@link org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants} */ - public static final String ID_ANT_PROCESS_TYPE = IAntLaunchConstants.ID_ANT_PROCESS_TYPE; + public static final String ID_ANT_PROCESS_TYPE = org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants.ID_ANT_PROCESS_TYPE; }
diff --git a/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/SetTargetsDialog.java b/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/SetTargetsDialog.java index 8145809..1b8065f 100644 --- a/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/SetTargetsDialog.java +++ b/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/SetTargetsDialog.java
@@ -1,10 +1,10 @@ /******************************************************************************* - * Copyright (c) 2005, 2008 IBM Corporation and others. + * Copyright (c) 2005, 2009 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are 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: * IBM Corporation - initial API and implementation *******************************************************************************/
diff --git a/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntTargetNode.java b/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntTargetNode.java index 0413e66..0bd4c1c 100644 --- a/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntTargetNode.java +++ b/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntTargetNode.java
@@ -1,11 +1,11 @@ /******************************************************************************* - * Copyright (c) 2004, 2008 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are 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: + * Copyright (c) 2004, 2009 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are 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: * IBM Corporation - initial API and implementation *******************************************************************************/ @@ -67,13 +67,13 @@ /** * Returns whether this target is an internal target. Internal - * targets are targets which have no description. The default target + * targets are targets which has no description or starts with hyphen ('-') character. The default target * is never considered internal. * @return whether the given target is an internal target */ public boolean isInternal() { Target target= getTarget(); - return target.getDescription() == null && !isDefaultTarget(); + return (target.getDescription() == null || getTargetName().startsWith("-")) && !isDefaultTarget(); //$NON-NLS-1$ } /* (non-Javadoc) @@ -83,7 +83,7 @@ ImageDescriptor base= null; if (isDefaultTarget()) { base = AntUIImages.getImageDescriptor(IAntUIConstants.IMG_ANT_DEFAULT_TARGET); - } else if (getTarget().getDescription() == null) { + } else if (isInternal()) { base = AntUIImages.getImageDescriptor(IAntUIConstants.IMG_ANT_TARGET_INTERNAL); } else { base = AntUIImages.getImageDescriptor(IAntUIConstants.IMG_ANT_TARGET);
diff --git a/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/InternalTargetFilter.java b/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/InternalTargetFilter.java index 5f9ee6c..3e0daa5 100644 --- a/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/InternalTargetFilter.java +++ b/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/InternalTargetFilter.java
@@ -1,17 +1,16 @@ /******************************************************************************* - * Copyright (c) 2000, 2005 IBM Corporation and others. + * Copyright (c) 2000, 2009 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are 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: * IBM Corporation - initial API and implementation *******************************************************************************/ package org.eclipse.ant.internal.ui.model; -import org.apache.tools.ant.Target; import org.eclipse.jface.viewers.CheckboxTableViewer; import org.eclipse.jface.viewers.Viewer; import org.eclipse.jface.viewers.ViewerFilter; @@ -34,8 +33,7 @@ } } if (element instanceof AntTargetNode) { - Target target= ((AntTargetNode)element).getTarget(); - result= target.getDescription() != null || ((AntTargetNode)element).isDefaultTarget(); + result = !((AntTargetNode)element).isInternal(); } if (!result) { fFiltered++;
diff --git a/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AntClasspathLabelProvider.java b/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AntClasspathLabelProvider.java index 030eae9..bb4f665 100644 --- a/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AntClasspathLabelProvider.java +++ b/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AntClasspathLabelProvider.java
@@ -1,10 +1,10 @@ /******************************************************************************* - * Copyright (c) 2000, 2005 IBM Corporation and others. + * Copyright (c) 2000, 2009 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are 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: * IBM Corporation - initial API and implementation *******************************************************************************/
diff --git a/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/ui/launching/IAntLaunchConfigurationConstants.java b/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/ui/launching/IAntLaunchConfigurationConstants.java index 7486d92..a493c00 100644 --- a/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/ui/launching/IAntLaunchConfigurationConstants.java +++ b/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/ui/launching/IAntLaunchConfigurationConstants.java
@@ -1,10 +1,10 @@ /******************************************************************************* - * Copyright (c) 2008 IBM Corporation and others. + * Copyright (c) 2008, 2009 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are 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: * IBM Corporation - initial API and implementation *******************************************************************************/
diff --git a/ant/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/inputhandler/RemoteAntMessages.java b/ant/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/inputhandler/RemoteAntMessages.java index c4a0d4a..c232458 100644 --- a/ant/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/inputhandler/RemoteAntMessages.java +++ b/ant/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/inputhandler/RemoteAntMessages.java
@@ -1,10 +1,10 @@ /******************************************************************************* - * Copyright (c) 2000, 2005 IBM Corporation and others. + * Copyright (c) 2000, 2009 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are 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: * IBM Corporation - initial API and implementation *******************************************************************************/
diff --git a/ant/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/inputhandler/SWTInputHandler.java b/ant/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/inputhandler/SWTInputHandler.java index 6c5a0e7..6b77f13 100644 --- a/ant/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/inputhandler/SWTInputHandler.java +++ b/ant/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/inputhandler/SWTInputHandler.java
@@ -1,10 +1,10 @@ /******************************************************************************* - * Copyright (c) 2004, 2007 IBM Corporation and others. + * Copyright (c) 2004, 2009 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are 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: * IBM Corporation - initial API and implementation * Brock Janiczak (brockj@tpg.com.au) - Bug 145736
diff --git a/ant/org.eclipse.ant.ui/build.properties b/ant/org.eclipse.ant.ui/build.properties index 2f17f27..99a5cc4 100644 --- a/ant/org.eclipse.ant.ui/build.properties +++ b/ant/org.eclipse.ant.ui/build.properties
@@ -1,10 +1,10 @@ ############################################################################### -# Copyright (c) 2000, 2007 IBM Corporation and others. +# Copyright (c) 2000, 2009 IBM Corporation and others. # All rights reserved. This program and the accompanying materials # are 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: # IBM Corporation - initial API and implementation ###############################################################################
diff --git a/ant/org.eclipse.ant.ui/buildfiles/buildExtraJAR.xml b/ant/org.eclipse.ant.ui/buildfiles/buildExtraJAR.xml index 276b2c7..55cd644 100644 --- a/ant/org.eclipse.ant.ui/buildfiles/buildExtraJAR.xml +++ b/ant/org.eclipse.ant.ui/buildfiles/buildExtraJAR.xml Binary files differ
diff --git a/ant/org.eclipse.ant.ui/buildfiles/buildRemoteExtraJAR.xml b/ant/org.eclipse.ant.ui/buildfiles/buildRemoteExtraJAR.xml index e77c632..9c485e4 100644 --- a/ant/org.eclipse.ant.ui/buildfiles/buildRemoteExtraJAR.xml +++ b/ant/org.eclipse.ant.ui/buildfiles/buildRemoteExtraJAR.xml Binary files differ