Skip to main content
summaryrefslogtreecommitdiffstats
blob: a76b04b7667ea980df8b4fd90b7ef2e42c08ae8a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
/*******************************************************************************
 * Copyright (c) 2004 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.wst.command.internal.provisional.env.core.selection;

import java.util.Vector;

/**
 * This is a Dynamic version of the SelectionListChoices class.
 */
public class DynamicList 
{
  private Vector stringList_ = new Vector();
  private Vector dynamicListVectorList_ = new Vector();
  
  /**
   * Adds an entry into the dynamic list.
   * 
   * @param values the string values that lead to the target.
   * @param target the target.
   */
  public void add( String[] values, Object target )
  {
    DynamicList currentList = this;
    
    for( int index = 0; index < values.length; index++ )
    {
      String value      = values[index];
      int    length     = currentList.stringList_.size();
      int    foundIndex = -1;
      
      // Find the string in the current list.
      for( int searchIndex = 0; searchIndex < length; searchIndex++ )
      {
        String string = (String)currentList.stringList_.elementAt( searchIndex ); 
        
        if( string.equals( value ) ) 
        {
          foundIndex = searchIndex;
          break;
        }
      }
      
      if( foundIndex == -1 )
      {
        // We have a new string so add it to the list.
        currentList.stringList_.add( value );
        currentList.dynamicListVectorList_.add( new DynamicList() );
        foundIndex = length;
      }
      
      currentList = (DynamicList)currentList.dynamicListVectorList_.elementAt( foundIndex );       
    }
    
    currentList.dynamicListVectorList_.add( target );
  }
  
  /**
   * 
   * @return returns a SelectionListChoices object from this DynamicList
   * object.
   */
  public SelectionListChoices toListChoices()
  {
    SelectionList list   = new SelectionList( (String[])stringList_.toArray( new String[0] ), 0);
    int           length = dynamicListVectorList_.size();
    Vector        vector = new Vector(); 
    
    for( int index = 0; index < length; index++ )
    {
      Object obj = dynamicListVectorList_.elementAt(index);
      
      if( obj instanceof DynamicList )
      {
        vector.add( ((DynamicList)obj).toListChoices() );
      }
      else
      {
        vector.add( obj );
      }
    }
    
    return new SelectionListChoices( list, vector );
  }
}

Back to the top

style='width: 0.0%;'/> -rw-r--r--ant/org.eclipse.ant.core/.settings/org.eclipse.pde.core.prefs3
-rw-r--r--ant/org.eclipse.ant.core/about.html54
-rw-r--r--ant/org.eclipse.ant.core/about_files/NOTICE15
-rw-r--r--ant/org.eclipse.ant.core/about_files/asl-v20.txt202
-rw-r--r--ant/org.eclipse.ant.core/build.properties25
-rw-r--r--ant/org.eclipse.ant.core/buildfiles/exportplugin.xml37
-rw-r--r--ant/org.eclipse.ant.core/plugin.properties19
-rw-r--r--ant/org.eclipse.ant.core/schema/antProperties.exsd149
-rw-r--r--ant/org.eclipse.ant.core/schema/antTypes.exsd141
-rw-r--r--ant/org.eclipse.ant.core/schema/extraClasspathEntries.exsd113
-rw-r--r--ant/org.eclipse.ant.core/src/org/eclipse/ant/core/AntCorePlugin.java308
-rw-r--r--ant/org.eclipse.ant.core/src/org/eclipse/ant/core/AntSecurityException.java26
-rw-r--r--ant/org.eclipse.ant.core/src/org/eclipse/ant/core/IAntClasspathEntry.java44
-rw-r--r--ant/org.eclipse.ant.core/src/org/eclipse/ant/core/Task.java39
-rw-r--r--ant/org.eclipse.ant.core/src/org/eclipse/ant/core/Type.java39
-rw-r--r--ant/org.eclipse.ant.core/src/org/eclipse/ant/core/package.html14
-rw-r--r--ant/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/AbstractEclipseBuildLogger.java30
-rw-r--r--ant/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/AntClassLoader.java169
-rw-r--r--ant/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/AntPropertyValueProvider.java59
-rw-r--r--ant/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/AntSecurityManager.java373
-rw-r--r--ant/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/InternalCoreAntMessages.java35
-rw-r--r--ant/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/InternalCoreAntMessages.properties24
-rw-r--r--ant/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/contentDescriber/AntBuildfileContentDescriber.java118
-rw-r--r--ant/org.eclipse.ant.core/src_ant/META-INF/eclipse.inf1
-rw-r--r--ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/DemuxInputStreamSetter.java26
-rw-r--r--ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/EclipseAntMain.java50
-rw-r--r--ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/EclipseDefaultExecutor.java41
-rw-r--r--ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/EclipseMainHelper.java25
-rw-r--r--ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/EclipseSingleCheckExecutor.java39
-rw-r--r--ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/ExecutorSetter.java26
-rw-r--r--ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/FailInputHandler.java29
-rw-r--r--ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/InputHandlerSetter.java45
-rw-r--r--ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/InternalProject.java178
-rw-r--r--ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/InternalProject2.java31
-rw-r--r--ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/NullInputHandler.java33
-rw-r--r--ant/org.eclipse.ant.launching/.classpath10
-rw-r--r--ant/org.eclipse.ant.launching/.externalToolBuilders/build common debug [Builder].launch21
-rw-r--r--ant/org.eclipse.ant.launching/.externalToolBuilders/build loggers [Builder].launch22
-rw-r--r--ant/org.eclipse.ant.launching/.externalToolBuilders/build remote support [Builder].launch21
-rw-r--r--ant/org.eclipse.ant.launching/.project64
-rw-r--r--ant/org.eclipse.ant.launching/about.html53
-rw-r--r--ant/org.eclipse.ant.launching/build.properties32
-rw-r--r--ant/org.eclipse.ant.launching/buildfiles/buildCommonDebug.xml39
-rw-r--r--ant/org.eclipse.ant.launching/buildfiles/buildLoggers.xml39
-rw-r--r--ant/org.eclipse.ant.launching/buildfiles/buildRemote.xml39
-rw-r--r--ant/org.eclipse.ant.launching/common/META-INF/eclipse.inf1
-rw-r--r--ant/org.eclipse.ant.launching/common/org/eclipse/ant/internal/launching/debug/IDebugBuildLogger.java21
-rw-r--r--ant/org.eclipse.ant.launching/loggers/META-INF/eclipse.inf1
-rw-r--r--ant/org.eclipse.ant.launching/loggers/org/eclipse/ant/internal/launching/runtime/logger/NullBuildLogger.java179
-rw-r--r--ant/org.eclipse.ant.launching/loggers/org/eclipse/ant/internal/launching/runtime/logger/RuntimeMessages.java32
-rw-r--r--ant/org.eclipse.ant.launching/loggers/org/eclipse/ant/internal/launching/runtime/logger/RuntimeMessages.properties20
-rw-r--r--ant/org.eclipse.ant.launching/plugin.properties24
-rw-r--r--ant/org.eclipse.ant.launching/remote/META-INF/eclipse.inf1
-rw-r--r--ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/AntSecurityException.java23
-rw-r--r--ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/AntSecurityManager.java371
-rw-r--r--ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/DemuxInputStreamSetter.java26
-rw-r--r--ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/EclipseDefaultExecutor.java41
-rw-r--r--ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/EclipseSingleCheckExecutor.java39
-rw-r--r--ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/ExecutorSetter.java26
-rw-r--r--ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/InputHandlerSetter.java44
-rw-r--r--ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/RemoteAntMessages.java33
-rw-r--r--ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/RemoteAntMessages.properties76
-rw-r--r--ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/inputhandler/FailInputHandler.java29
-rw-r--r--ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/logger/MessageIds.java21
-rw-r--r--ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/logger/RemoteAntBreakpoint.java74
-rw-r--r--ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/AntCoreModelMessages.java25
-rw-r--r--ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/AntCoreModelMessages.properties14
-rw-r--r--ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/AntLaunch.java57
-rw-r--r--ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/AntLaunchingPreferenceInitializer.java37
-rw-r--r--ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/IAntLaunchingPreferenceConstants.java23
-rw-r--r--ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/LinkDescriptor.java73
-rw-r--r--ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/AntDebugMessages.java23
-rw-r--r--ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/AntDebugMessages.properties12
-rw-r--r--ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/AntSourceContainer.java73
-rw-r--r--ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/AntSourceLookupDirector.java36
-rw-r--r--ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/AntSourceLookupParticipant.java36
-rw-r--r--ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/AntSourcePathComputerDelegate.java33
-rw-r--r--ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/IAntDebugConstants.java33
-rw-r--r--ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/AntDebugElement.java55
-rw-r--r--ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/AntLineBreakpoint.java112
-rw-r--r--ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/AntProperties.java109
-rw-r--r--ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/AntPropertiesValue.java71
-rw-r--r--ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/AntProperty.java121
-rw-r--r--ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/AntStackFrame.java314
-rw-r--r--ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/AntValue.java71
-rw-r--r--ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/DebugMessageIds.java47
-rw-r--r--ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/DebugModelMessages.java32
-rw-r--r--ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/DebugModelMessages.properties21
-rw-r--r--ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/AntClasspathProvider.java50
-rw-r--r--ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/AntHomeClasspathEntry.java210
-rw-r--r--ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/AntJavaLaunchDelegate.java47
-rw-r--r--ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/AntLaunchConfigurationMessages.java37
-rw-r--r--ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/AntLaunchConfigurationMessages.properties26
-rw-r--r--ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/AntMigrationDelegate.java77
-rw-r--r--ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/AntStreamMonitor.java83
-rw-r--r--ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/AntStreamsProxy.java65
-rw-r--r--ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/MessageIds.java21
-rw-r--r--ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/RemoteAntProcessFactory.java34
-rw-r--r--ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/RemoteAntRuntimeProcess.java37
-rw-r--r--ant/org.eclipse.ant.launching/src/org/eclipse/ant/launching/IAntLaunchConstants.java126
-rw-r--r--ant/org.eclipse.ant.launching/src/org/eclipse/ant/launching/package.html13
-rw-r--r--ant/org.eclipse.ant.tests.core/.classpath9
-rw-r--r--ant/org.eclipse.ant.tests.core/.externalToolBuilders/Ant Test Support Lib Builder.launch16
-rw-r--r--ant/org.eclipse.ant.tests.core/.project37
-rw-r--r--ant/org.eclipse.ant.tests.core/.settings/org.eclipse.pde.core.prefs3
-rw-r--r--ant/org.eclipse.ant.tests.core/.settings/org.eclipse.pde.prefs29
-rw-r--r--ant/org.eclipse.ant.tests.core/about.html28
-rw-r--r--ant/org.eclipse.ant.tests.core/build.properties28
-rw-r--r--ant/org.eclipse.ant.tests.core/buildfiles/buildAntTestsSupportJAR.xml55
-rw-r--r--ant/org.eclipse.ant.tests.core/plugin.properties13
-rw-r--r--ant/org.eclipse.ant.tests.core/plugin.xml76
-rw-r--r--ant/org.eclipse.ant.tests.core/test plugin/org/eclipse/ant/tests/core/testplugin/AntFileRunner.java78
-rw-r--r--ant/org.eclipse.ant.tests.core/test plugin/org/eclipse/ant/tests/core/testplugin/AntTestChecker.java229
-rw-r--r--ant/org.eclipse.ant.tests.core/test plugin/org/eclipse/ant/tests/core/testplugin/AntTestPlugin.java63
-rw-r--r--ant/org.eclipse.ant.tests.core/test plugin/org/eclipse/ant/tests/core/testplugin/AntTestPropertyValueProvider.java24
-rw-r--r--ant/org.eclipse.ant.tests.core/test plugin/org/eclipse/ant/tests/core/testplugin/ProjectHelper.java114
-rw-r--r--ant/org.eclipse.ant.tests.core/test support/org/eclipse/ant/tests/core/support/inputHandlers/AntTestInputHandler.java36
-rw-r--r--ant/org.eclipse.ant.tests.core/test support/org/eclipse/ant/tests/core/support/tasks/AntTestTask.java35
-rw-r--r--ant/org.eclipse.ant.tests.core/test support/org/eclipse/ant/tests/core/support/tasks/AntTestTask2.java35
-rw-r--r--ant/org.eclipse.ant.tests.core/test support/org/eclipse/ant/tests/core/support/testloggers/TestBuildListener.java64
-rw-r--r--ant/org.eclipse.ant.tests.core/test support/org/eclipse/ant/tests/core/support/testloggers/TestBuildLogger.java178
-rw-r--r--ant/org.eclipse.ant.tests.core/test support/org/eclipse/ant/tests/core/support/types/AntTestPath.java34
-rw-r--r--ant/org.eclipse.ant.tests.core/test.xml54
-rw-r--r--ant/org.eclipse.ant.tests.core/testbuildfiles/Bug32551.xml15
-rw-r--r--ant/org.eclipse.ant.tests.core/testbuildfiles/Bug34663.xml8
-rw-r--r--ant/org.eclipse.ant.tests.core/testbuildfiles/Bug42926.xml12
-rw-r--r--ant/org.eclipse.ant.tests.core/testbuildfiles/Bug73602.xml13
-rw-r--r--ant/org.eclipse.ant.tests.core/testbuildfiles/ClasspathOrdering.xml6
-rw-r--r--ant/org.eclipse.ant.tests.core/testbuildfiles/CustomTask.xml13
-rw-r--r--ant/org.eclipse.ant.tests.core/testbuildfiles/CustomType.xml16
-rw-r--r--ant/org.eclipse.ant.tests.core/testbuildfiles/ExtensionPointTask.xml16
-rw-r--r--ant/org.eclipse.ant.tests.core/testbuildfiles/ExtensionPointType.xml12
-rw-r--r--ant/org.eclipse.ant.tests.core/testbuildfiles/NoDefault.xml5
-rw-r--r--ant/org.eclipse.ant.tests.core/testbuildfiles/TestForEcho.xml11
-rw-r--r--ant/org.eclipse.ant.tests.core/testbuildfiles/build.xml14
-rw-r--r--ant/org.eclipse.ant.tests.core/testbuildfiles/echoing.xml14
-rw-r--r--ant/org.eclipse.ant.tests.core/testbuildfiles/failingTarget.xml9
-rw-r--r--ant/org.eclipse.ant.tests.core/testbuildfiles/input.xml7
-rw-r--r--ant/org.eclipse.ant.tests.core/testbuildfiles/javac.xml33
-rw-r--r--ant/org.eclipse.ant.tests.core/testlib/classpathOrdering1.jarbin0 -> 663 bytes-rw-r--r--ant/org.eclipse.ant.tests.core/testlib/classpathOrdering2.jarbin0 -> 664 bytes-rw-r--r--ant/org.eclipse.ant.tests.core/testlib/taskFolder/org/eclipse/ant/tests/core/support/tasks/AntTestTask2.classbin0 -> 894 bytes-rw-r--r--ant/org.eclipse.ant.tests.core/testresources/AntTestTask.java34
-rw-r--r--ant/org.eclipse.ant.tests.core/testresources/taskdefs.properties12
-rw-r--r--ant/org.eclipse.ant.tests.core/testresources/test.properties12
-rw-r--r--ant/org.eclipse.ant.tests.core/tests/org/eclipse/ant/tests/core/AbstractAntTest.java263
-rw-r--r--ant/org.eclipse.ant.tests.core/tests/org/eclipse/ant/tests/core/tests/ProjectTests.java77
-rw-r--r--ant/org.eclipse.ant.tests.core/tests/org/eclipse/ant/tests/core/tests/TaskTests.java151
-rw-r--r--ant/org.eclipse.ant.tests.core/tests/org/eclipse/ant/tests/core/tests/TypeTests.java79
-rw-r--r--ant/org.eclipse.ant.tests.ui/.classpath12
-rw-r--r--ant/org.eclipse.ant.tests.ui/.externalToolBuilders/Build Test Support JAR.launch15
-rw-r--r--ant/org.eclipse.ant.tests.ui/.project37
-rw-r--r--ant/org.eclipse.ant.tests.ui/.settings/org.eclipse.pde.core.prefs3
-rw-r--r--ant/org.eclipse.ant.tests.ui/.settings/org.eclipse.pde.prefs29
-rw-r--r--ant/org.eclipse.ant.tests.ui/Ant Debug Tests/org/eclipse/ant/tests/ui/debug/BreakpointTests.java217
-rw-r--r--ant/org.eclipse.ant.tests.ui/Ant Debug Tests/org/eclipse/ant/tests/ui/debug/DebugElementEventWaiter.java33
-rw-r--r--ant/org.eclipse.ant.tests.ui/Ant Debug Tests/org/eclipse/ant/tests/ui/debug/DebugElementKindEventDetailWaiter.java32
-rw-r--r--ant/org.eclipse.ant.tests.ui/Ant Debug Tests/org/eclipse/ant/tests/ui/debug/StackTests.java55
-rw-r--r--ant/org.eclipse.ant.tests.ui/Ant Debug Tests/org/eclipse/ant/tests/ui/debug/SteppingTests.java234
-rw-r--r--ant/org.eclipse.ant.tests.ui/Ant Editor Tests/org/eclipse/ant/tests/ui/dtd/dumper.java147
-rw-r--r--ant/org.eclipse.ant.tests.ui/Ant Editor Tests/org/eclipse/ant/tests/ui/editor/TaskDescriptionProviderTest.java65
-rw-r--r--ant/org.eclipse.ant.tests.ui/Ant Editor Tests/org/eclipse/ant/tests/ui/editor/formatter/FormattingPreferencesTest.java59
-rw-r--r--ant/org.eclipse.ant.tests.ui/Ant Editor Tests/org/eclipse/ant/tests/ui/editor/formatter/XmlDocumentFormatterTest.java84
-rw-r--r--ant/org.eclipse.ant.tests.ui/Ant Editor Tests/org/eclipse/ant/tests/ui/editor/formatter/XmlFormatterTest.java71
-rw-r--r--ant/org.eclipse.ant.tests.ui/Ant Editor Tests/org/eclipse/ant/tests/ui/editor/formatter/XmlTagFormatterTest.java378
-rw-r--r--ant/org.eclipse.ant.tests.ui/Ant Editor Tests/org/eclipse/ant/tests/ui/editor/performance/EditorTestHelper.java148
-rw-r--r--ant/org.eclipse.ant.tests.ui/Ant Editor Tests/org/eclipse/ant/tests/ui/editor/performance/NonInitialTypingTest.java94
-rw-r--r--ant/org.eclipse.ant.tests.ui/Ant Editor Tests/org/eclipse/ant/tests/ui/editor/support/TestLocationProvider.java36
-rw-r--r--ant/org.eclipse.ant.tests.ui/Ant Editor Tests/org/eclipse/ant/tests/ui/editor/support/TestProblemRequestor.java39
-rw-r--r--ant/org.eclipse.ant.tests.ui/Ant Editor Tests/org/eclipse/ant/tests/ui/editor/support/TestTextCompletionProcessor.java224
-rw-r--r--ant/org.eclipse.ant.tests.ui/Ant Tests/org/eclipse/ant/tests/ui/AbstractAntUIBuildPerformanceTest.java143
-rw-r--r--ant/org.eclipse.ant.tests.ui/Ant Tests/org/eclipse/ant/tests/ui/AbstractAntUIBuildTest.java100
-rw-r--r--ant/org.eclipse.ant.tests.ui/Ant Tests/org/eclipse/ant/tests/ui/AntUtilTests.java128
-rw-r--r--ant/org.eclipse.ant.tests.ui/Ant Tests/org/eclipse/ant/tests/ui/performance/AbstractAntPerformanceTest.java31
-rw-r--r--ant/org.eclipse.ant.tests.ui/Ant Tests/org/eclipse/ant/tests/ui/performance/OpenLaunchConfigurationDialogTests.java109
-rw-r--r--ant/org.eclipse.ant.tests.ui/Ant Tests/org/eclipse/ant/tests/ui/performance/SeparateVMTests.java105
-rw-r--r--ant/org.eclipse.ant.tests.ui/about.html28
-rw-r--r--ant/org.eclipse.ant.tests.ui/build.properties30
-rw-r--r--ant/org.eclipse.ant.tests.ui/buildfiles/buildAntTestsSupportJAR.xml49
-rw-r--r--ant/org.eclipse.ant.tests.ui/icons/ant.gifbin0 -> 216 bytes-rw-r--r--ant/org.eclipse.ant.tests.ui/plugin.properties13
-rw-r--r--ant/org.eclipse.ant.tests.ui/plugin.xml70
-rw-r--r--ant/org.eclipse.ant.tests.ui/test plugin/org/eclipse/ant/tests/ui/testplugin/AbstractAntUITest.java483
-rw-r--r--ant/org.eclipse.ant.tests.ui/test plugin/org/eclipse/ant/tests/ui/testplugin/AntUIPerformanceTests.java38
-rw-r--r--ant/org.eclipse.ant.tests.ui/test plugin/org/eclipse/ant/tests/ui/testplugin/AntUITestPlugin.java63
-rw-r--r--ant/org.eclipse.ant.tests.ui/test plugin/org/eclipse/ant/tests/ui/testplugin/ConsoleLineTracker.java117
-rw-r--r--ant/org.eclipse.ant.tests.ui/test plugin/org/eclipse/ant/tests/ui/testplugin/DebugElementKindEventWaiter.java36
-rw-r--r--ant/org.eclipse.ant.tests.ui/test plugin/org/eclipse/ant/tests/ui/testplugin/DebugEventWaiter.java170
-rw-r--r--ant/org.eclipse.ant.tests.ui/test plugin/org/eclipse/ant/tests/ui/testplugin/ProjectCreationDecorator.java47
-rw-r--r--ant/org.eclipse.ant.tests.ui/test plugin/org/eclipse/ant/tests/ui/testplugin/ProjectHelper.java229
-rw-r--r--ant/org.eclipse.ant.tests.ui/test support/org/eclipse/ant/tests/ui/support/inputHandlers/TestSWTInputHandler.java25
-rw-r--r--ant/org.eclipse.ant.tests.ui/test support/org/eclipse/ant/tests/ui/support/tasks/AntTestTask.java33
-rw-r--r--ant/org.eclipse.ant.tests.ui/test support/org/eclipse/ant/tests/ui/support/tasks/AntTestTask2.java55
-rw-r--r--ant/org.eclipse.ant.tests.ui/test support/org/eclipse/ant/tests/ui/support/tasks/NestElementTask.java52
-rw-r--r--ant/org.eclipse.ant.tests.ui/test support/org/eclipse/ant/tests/ui/support/types/AntTestPath.java32
-rw-r--r--ant/org.eclipse.ant.tests.ui/test.xml71
-rw-r--r--ant/org.eclipse.ant.tests.ui/testbuildfiles/102282.xml23
-rw-r--r--ant/org.eclipse.ant.tests.ui/testbuildfiles/74840.xml5
-rw-r--r--ant/org.eclipse.ant.tests.ui/testbuildfiles/85769.xml20
-rw-r--r--ant/org.eclipse.ant.tests.ui/testbuildfiles/89115.xml9
-rw-r--r--ant/org.eclipse.ant.tests.ui/testbuildfiles/89901.xml12
-rw-r--r--ant/org.eclipse.ant.tests.ui/testbuildfiles/96022.xml31
-rw-r--r--ant/org.eclipse.ant.tests.ui/testbuildfiles/98853.xml27
-rw-r--r--ant/org.eclipse.ant.tests.ui/testbuildfiles/antUITestsSupport.jarbin0 -> 3224 bytes-rw-r--r--ant/org.eclipse.ant.tests.ui/testbuildfiles/bad.xml14
-rw-r--r--ant/org.eclipse.ant.tests.ui/testbuildfiles/badproject.xml4
-rw-r--r--ant/org.eclipse.ant.tests.ui/testbuildfiles/breakpoints.xml37
-rw-r--r--ant/org.eclipse.ant.tests.ui/testbuildfiles/build.Cp1251.xml10
-rw-r--r--ant/org.eclipse.ant.tests.ui/testbuildfiles/build.UTF8.xml9
-rw-r--r--ant/org.eclipse.ant.tests.ui/testbuildfiles/build.xml14
-rw-r--r--ant/org.eclipse.ant.tests.ui/testbuildfiles/buildtest1.properties13
-rw-r--r--ant/org.eclipse.ant.tests.ui/testbuildfiles/buildtest1.xml21
-rw-r--r--ant/org.eclipse.ant.tests.ui/testbuildfiles/buildtest2.xml5
-rw-r--r--ant/org.eclipse.ant.tests.ui/testbuildfiles/buildtest3.xml10
-rw-r--r--ant/org.eclipse.ant.tests.ui/testbuildfiles/buildtest4.xml8
-rw-r--r--ant/org.eclipse.ant.tests.ui/testbuildfiles/customBoolean.xml5
-rw-r--r--ant/org.eclipse.ant.tests.ui/testbuildfiles/debugAntCall.xml18
-rw-r--r--ant/org.eclipse.ant.tests.ui/testbuildfiles/dependencytest.xml38
-rw-r--r--ant/org.eclipse.ant.tests.ui/testbuildfiles/echoProperties.xml6
-rw-r--r--ant/org.eclipse.ant.tests.ui/testbuildfiles/echoing.xml19
-rw-r--r--ant/org.eclipse.ant.tests.ui/testbuildfiles/empty.xml0
-rw-r--r--ant/org.eclipse.ant.tests.ui/testbuildfiles/environmentVar.xml5
-rw-r--r--ant/org.eclipse.ant.tests.ui/testbuildfiles/extensionPointSepVM.xml14
-rw-r--r--ant/org.eclipse.ant.tests.ui/testbuildfiles/extensionPointTaskSepVM.xml6
-rw-r--r--ant/org.eclipse.ant.tests.ui/testbuildfiles/extensionPointTypeSepVM.xml12
-rw-r--r--ant/org.eclipse.ant.tests.ui/testbuildfiles/failingTarget.xml9
-rw-r--r--ant/org.eclipse.ant.tests.ui/testbuildfiles/formatTest_source01.xml24
-rw-r--r--ant/org.eclipse.ant.tests.ui/testbuildfiles/formatTest_target01.xml31
-rw-r--r--ant/org.eclipse.ant.tests.ui/testbuildfiles/formatTest_target02.xml31
-rw-r--r--ant/org.eclipse.ant.tests.ui/testbuildfiles/formatTest_target03.xml31
-rw-r--r--ant/org.eclipse.ant.tests.ui/testbuildfiles/import.xml20
-rw-r--r--ant/org.eclipse.ant.tests.ui/testbuildfiles/importRequiringUserProp.xml10
-rw-r--r--ant/org.eclipse.ant.tests.ui/testbuildfiles/importWithByteOrderMark.xml18
-rw-r--r--ant/org.eclipse.ant.tests.ui/testbuildfiles/input.xml7
-rw-r--r--ant/org.eclipse.ant.tests.ui/testbuildfiles/internalTargets.xml18
-rw-r--r--ant/org.eclipse.ant.tests.ui/testbuildfiles/javac.xml7
-rw-r--r--ant/org.eclipse.ant.tests.ui/testbuildfiles/macrodef.xml22
-rw-r--r--ant/org.eclipse.ant.tests.ui/testbuildfiles/mixed.xml1
-rw-r--r--ant/org.eclipse.ant.tests.ui/testbuildfiles/nestedElementAttributes.xml8
-rw-r--r--ant/org.eclipse.ant.tests.ui/testbuildfiles/occurrencesTest.xml49
-rw-r--r--ant/org.eclipse.ant.tests.ui/testbuildfiles/outline_select_test_build.xml20
-rw-r--r--ant/org.eclipse.ant.tests.ui/testbuildfiles/performance/build.xml2360
-rw-r--r--ant/org.eclipse.ant.tests.ui/testbuildfiles/projectOnly.xml4
-rw-r--r--ant/org.eclipse.ant.tests.ui/testbuildfiles/refid.xml49
-rw-r--r--ant/org.eclipse.ant.tests.ui/testbuildfiles/russianbuild.xml8
-rw-r--r--ant/org.eclipse.ant.tests.ui/testbuildfiles/taskdef.xml11
-rw-r--r--ant/org.eclipse.ant.tests.ui/testbuildfiles/test1.xml10
-rw-r--r--ant/org.eclipse.ant.tests.ui/testbuildfiles/test2.xml9
-rw-r--r--ant/org.eclipse.ant.tests.ui/testbuildfiles/test3.xml4
-rw-r--r--ant/org.eclipse.ant.tests.ui/testbuildfiles/test4.xml1
-rw-r--r--ant/org.eclipse.ant.tests.ui/testbuildfiles/test5.xml6
-rw-r--r--ant/org.eclipse.ant.tests.ui/testbuildfiles/toBeImported.xml12
-rw-r--r--ant/org.eclipse.ant.tests.ui/testbuildfiles/toBeImportedWithByteOrderMark.xml18
-rw-r--r--ant/org.eclipse.ant.tests.ui/testresources/Test2.java30
-rw-r--r--ant/org.eclipse.ant.ui/.classpath10
-rw-r--r--ant/org.eclipse.ant.ui/.externalToolBuilders/Build Ant Runner Support JAR.launch17
-rw-r--r--ant/org.eclipse.ant.ui/.externalToolBuilders/Build Remote Ant JAR.launch16
-rw-r--r--ant/org.eclipse.ant.ui/.project53
-rw-r--r--ant/org.eclipse.ant.ui/.settings/org.eclipse.pde.core.prefs3
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor Content Assist Dev/XDOCtasks.xml18688
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor Content Assist Dev/tasks.xml5139
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/dtd/AntDTDMessages.java24
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/dtd/AntDTDMessages.properties13
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/dtd/IAtom.java31
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/dtd/IAttribute.java64
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/dtd/IDfm.java86
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/dtd/IElement.java64
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/dtd/IModel.java78
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/dtd/ISchema.java33
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/dtd/ParseError.java28
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/dtd/Parser.java200
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/dtd/schema/AntDTDSchemaMessages.java29
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/dtd/schema/AntDTDSchemaMessages.properties18
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/dtd/schema/Attribute.java114
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/dtd/schema/Dfm.java170
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/dtd/schema/Element.java179
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/dtd/schema/Nfm.java289
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/dtd/schema/NfmNode.java113
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/dtd/schema/Schema.java67
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/dtd/util/AntDTDUtilMessages.java24
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/dtd/util/AntDTDUtilMessages.properties13
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/dtd/util/Factory.java68
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/dtd/util/FactoryObject.java22
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/dtd/util/IKeyHolder.java21
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/dtd/util/IMapHolder.java18
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/dtd/util/IValueHolder.java21
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/dtd/util/MapHolder.java48
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/dtd/util/SortedMapFactory.java52
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/dtd/util/SortedSet.java260
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/AntAutoEditStrategy.java315
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/AntEditorActionContributor.java174
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/AntEditorMessages.java37
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/AntEditorMessages.properties43
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/AntElementHyperlink.java56
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/AntElementHyperlinkDetector.java41
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/AntSourceViewerInformationControl.java237
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/DecayCodeCompletionDataStructuresThread.java71
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/EditorSynchronizer.java58
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/OccurrencesFinder.java109
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/actions/AntEditorActionMessages.java36
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/actions/AntEditorActionMessages.properties42
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/actions/FoldingActionGroup.java123
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/actions/FoldingExpandAllRulerAction.java31
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/actions/FoldingToggleRulerAction.java66
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/actions/OpenDeclarationAction.java58
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/actions/RenameInFileAction.java123
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/actions/RunToLineAdapter.java104
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/actions/ToggleAutoReconcileAction.java106
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/actions/ToggleMarkOccurrencesAction.java99
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/actions/TogglePresentationAction.java133
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/formatter/XmlDocumentFormattingStrategy.java83
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/formatter/XmlElementFormattingStrategy.java111
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/formatter/XmlTagFormatter.java428
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/outline/AntOutlineMessages.java36
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/outline/AntOutlineMessages.properties25
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/outline/FilterImportedElementsAction.java44
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/outline/FilterInternalTargetsAction.java44
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/outline/FilterPropertiesAction.java44
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/outline/FilterTopLevelAction.java44
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/outline/ToggleLinkWithEditorAction.java46
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/outline/ToggleSortAntOutlineAction.java40
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/templates/AntTemplateAccess.java82
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/templates/AntTemplateInformationControlCreator.java55
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/templates/AntTemplateProposal.java50
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/templates/AntTemplateVariableTextHover.java63
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/templates/AntTemplateViewerConfiguration.java26
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/templates/AntVariableResolver.java50
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/templates/BuildFileContextType.java42
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/templates/TargetContextType.java16
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/templates/TaskContextType.java16
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/text/AbstractAntEditorScanner.java76
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/text/AnnotationModelFactory.java31
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/text/AntAnnotationModel.java132
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/text/AntDocumentSetupParticipant.java53
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/text/AntEditorPartitionScanner.java69
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/text/AntEditorProcInstrScanner.java71
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/text/AntEditorTagScanner.java77
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/text/AntEditorTextMessages.java25
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/text/AntEditorTextMessages.properties14
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/text/AntEditorWhitespaceDetector.java31
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/text/AntExternalAnnotationModel.java97
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/text/AntInformationProvider.java38
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/text/AntStorageDocumentProvider.java49
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/text/DocTypeRule.java50
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/text/FileScanner.java26
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/text/IAntEditorColorConstants.java39
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/text/IReconcilingParticipant.java24
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/text/MultilineDamagerRepairer.java50
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/text/NotifyingReconciler.java64
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/text/TagRule.java94
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/text/XMLAnnotationHover.java184
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/text/XMLProblemAnnotation.java41
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/text/XMLReconcilingStrategy.java93
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/utils/ProjectHelperMessages.java23
-rw-r--r--ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/utils/ProjectHelperMessages.properties11
-rw-r--r--ant/org.eclipse.ant.ui/Ant Runner Support/META-INF/eclipse.inf1
-rw-r--r--ant/org.eclipse.ant.ui/Ant Runner Support/org/eclipse/ant/internal/ui/antsupport/AntSupportMessages.java26
-rw-r--r--ant/org.eclipse.ant.ui/Ant Runner Support/org/eclipse/ant/internal/ui/antsupport/AntSupportMessages.properties15
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/AntDoubleClickStrategy.java35
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/AntImageDescriptor.java135
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/AntPropertyValueProvider.java54
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/AntRunnerWorkbenchAdvisor.java62
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/AntSourceViewerConfiguration.java213
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/AntUIImages.java204
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/AntUIModelMessages.java29
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/AntUIModelMessages.properties18
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/ColorManager.java58
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/ExternalHyperlink.java87
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/IAntUIConstants.java123
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/ImageDescriptorRegistry.java91
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/WorkbenchAntRunner.java57
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/console/AbstractJavacPatternMatcher.java163
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/console/AntConsoleColorProvider.java116
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/console/ConsoleMessages.java24
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/console/EclipseJavacPatternMatcher.java51
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/console/JavacMarkerCreator.java178
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/console/JavacPatternMatcher.java67
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/console/JikesJavacPatternMatcher.java37
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/console/TaskLineTracker.java60
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/datatransfer/AntBuildfileExportWizard.java54
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/datatransfer/AntNewJavaProjectWizard.java58
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/datatransfer/DataTransferMessages.java75
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/datatransfer/ProjectCreator.java206
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/model/DebugModelMessages.java30
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/model/DebugModelMessages.properties17
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AddVariableStringAction.java43
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntClasspathTab.java136
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntEnvironmentTab.java77
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntLaunchConfigurationMessages.java93
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntLaunchConfigurationMessages.properties82
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntLaunchDelegate.java26
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntLaunchShortcutWithDialog.java23
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntPropertiesTab.java260
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntTargetsTab.java845
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntWorkingDirectoryBlock.java71
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/EditAntHomeEntryAction.java95
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/IAntLaunchConfigurationConstants.java158
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/RunAntStatusHandler.java33
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/TargetOrderDialog.java253
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/VariableInputDialog.java125
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntCommentNode.java37
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntDTDNode.java37
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntElementAdapterFactory.java41
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntModelChangeEvent.java40
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntModelContentProvider.java85
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntModelCore.java115
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntModelLabelProvider.java50
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntModelMessages.java37
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntModelMessages.properties26
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntModelProblem.java148
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntProjectNodeProxy.java271
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntTaskNode.java218
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/IAntElement.java18
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/IAntModelListener.java18
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/IProblem.java54
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/IProblemRequestor.java35
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/InternalTargetFilter.java54
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/LocationProvider.java43
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AbstractClasspathEntry.java72
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AddPropertyDialog.java175
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AntClasspathContentProvider.java211
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AntClasspathLabelProvider.java145
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AntClasspathPage.java251
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AntContentProvider.java138
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AntEditorPreferenceConstants.java313
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AntPage.java473
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AntPreviewerUpdater.java227
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AntPropertiesPage.java159
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AntRuntimePreferencePage.java167
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AntTasksPage.java133
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AntTypesPage.java134
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/ClasspathModel.java250
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/ColorEditor.java123
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/FileFilter.java110
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/FormatPreviewCode.txt35
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/GlobalClasspathEntries.java68
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/IAntBlockContainer.java51
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/IClasspathEntry.java38
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/MinimizedFileSystemElement.java216
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/OverlayPreferenceStore.java451
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/StatusInfo.java172
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/SyntaxPreviewCode.txt14
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/TabFolderLayout.java54
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/URLFieldEditor.java100
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/refactoring/LaunchConfigurationBuildfileRenameParticipant.java53
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/refactoring/LaunchConfigurationIProjectRenameParticipant.java54
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/refactoring/RefactoringMessages.java30
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/refactoring/RefactoringMessages.properties19
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/views/AntViewContentProvider.java76
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/views/AntViewMessages.java26
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/views/AntViewMessages.properties15
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/views/actions/AddBuildFilesAction.java96
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/views/actions/AntOpenWithMenu.java287
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/views/actions/AntViewActionMessages.java59
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/views/actions/AntViewActionMessages.properties48
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/views/actions/EditorImageDescriptor.java92
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/views/actions/FilterInternalTargetsAction.java40
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/views/actions/RefreshBuildFilesAction.java116
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/views/actions/RemoveAllAction.java47
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/views/actions/RemoveProjectAction.java77
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/views/actions/RunTargetAction.java130
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/views/actions/SearchForBuildFilesAction.java95
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/ui/launching/IAntLaunchConfigurationConstants.java146
-rw-r--r--ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/ui/launching/package.html13
-rw-r--r--ant/org.eclipse.ant.ui/Remote Ant Support/META-INF/eclipse.inf1
-rw-r--r--ant/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/inputhandler/ProxyInputHandler.java26
-rw-r--r--ant/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/inputhandler/RemoteAntMessages.java33
-rw-r--r--ant/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/inputhandler/RemoteAntMessages.properties17
-rw-r--r--ant/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/inputhandler/SWTInputHandler.java251
-rw-r--r--ant/org.eclipse.ant.ui/about.html54
-rw-r--r--ant/org.eclipse.ant.ui/about_files/NOTICE15
-rw-r--r--ant/org.eclipse.ant.ui/about_files/asl-v20.txt202
-rw-r--r--ant/org.eclipse.ant.ui/build.properties33
-rw-r--r--ant/org.eclipse.ant.ui/buildfiles/exportplugin.xml44
-rw-r--r--ant/org.eclipse.ant.ui/icons/full/dlcl16/add_co.gifbin0 -> 215 bytes-rw-r--r--ant/org.eclipse.ant.ui/icons/full/dlcl16/alpha_mode.gifbin0 -> 110 bytes-rw-r--r--ant/org.eclipse.ant.ui/icons/full/dlcl16/ant_targets.gifbin0 -> 159 bytes-rw-r--r--ant/org.eclipse.ant.ui/icons/full/dlcl16/exportAnt_co.gifbin0 -> 148 bytes-rw-r--r--ant/org.eclipse.ant.ui/icons/full/dlcl16/filter_imported_elements.gifbin0 -> 81 bytes-rw-r--r--ant/org.eclipse.ant.ui/icons/full/dlcl16/filter_internal_targets.gifbin0 -> 246 bytes-rw-r--r--ant/org.eclipse.ant.ui/icons/full/dlcl16/filter_properties.gifbin0 -> 144 bytes-rw-r--r--ant/org.eclipse.ant.ui/icons/full/dlcl16/filter_top_level.gifbin0 -> 89 bytes-rw-r--r--ant/org.eclipse.ant.ui/icons/full/dlcl16/properties.gifbin0 -> 219 bytes-rw-r--r--ant/org.eclipse.ant.ui/icons/full/dlcl16/refresh.gifbin0 -> 209 bytes-rw-r--r--ant/org.eclipse.ant.ui/icons/full/dlcl16/remove_co.gifbin0 -> 159 bytes-rw-r--r--ant/org.eclipse.ant.ui/icons/full/dlcl16/removeall_co.gifbin0 -> 187 bytes-rw-r--r--ant/org.eclipse.ant.ui/icons/full/dlcl16/run_tool.gifbin0 -> 359 bytes-rw-r--r--ant/org.eclipse.ant.ui/icons/full/dlcl16/search.gifbin0 -> 331 bytes-rw-r--r--ant/org.eclipse.ant.ui/icons/full/dlcl16/synced.gifbin0 -> 149 bytes-rw-r--r--ant/org.eclipse.ant.ui/icons/full/dtool16/mark_occurrences.gifbin0 -> 208 bytes-rw-r--r--ant/org.eclipse.ant.ui/icons/full/dtool16/segment_edit.gifbin0 -> 232 bytes-rw-r--r--ant/org.eclipse.ant.ui/icons/full/elcl16/add_co.gifbin0 -> 228 bytes-rw-r--r--ant/org.eclipse.ant.ui/icons/full/elcl16/alpha_mode.gifbin0 -> 157 bytes-rw-r--r--ant/org.eclipse.ant.ui/icons/full/elcl16/ant_targets.gifbin0 -> 211 bytes-rw-r--r--ant/org.eclipse.ant.ui/icons/full/elcl16/exportAnt_co.gifbin0 -> 157 bytes-rw-r--r--ant/org.eclipse.ant.ui/icons/full/elcl16/filter_imported_elements.gifbin0 -> 193 bytes-rw-r--r--ant/org.eclipse.ant.ui/icons/full/elcl16/filter_internal_targets.gifbin0 -> 376 bytes-rw-r--r--ant/org.eclipse.ant.ui/icons/full/elcl16/filter_properties.gifbin0 -> 213 bytes-rw-r--r--ant/org.eclipse.ant.ui/icons/full/elcl16/filter_top_level.gifbin0 -> 150 bytes-rw-r--r--ant/org.eclipse.ant.ui/icons/full/elcl16/properties.gifbin0 -> 578 bytes-rw-r--r--ant/org.eclipse.ant.ui/icons/full/elcl16/refresh.gifbin0 -> 327 bytes-rw-r--r--ant/org.eclipse.ant.ui/icons/full/elcl16/remove_co.gifbin0 -> 163 bytes-rw-r--r--ant/org.eclipse.ant.ui/icons/full/elcl16/removeall_co.gifbin0 -> 204 bytes-rw-r--r--ant/org.eclipse.ant.ui/icons/full/elcl16/run_tool.gifbin0 -> 379 bytes-rw-r--r--ant/org.eclipse.ant.ui/icons/full/elcl16/search.gifbin0 -> 347 bytes-rw-r--r--ant/org.eclipse.ant.ui/icons/full/elcl16/synced.gifbin0 -> 160 bytes-rw-r--r--ant/org.eclipse.ant.ui/icons/full/etool16/mark_occurrences.gifbin0 -> 321 bytes-rw-r--r--ant/org.eclipse.ant.ui/icons/full/etool16/segment_edit.gifbin0 -> 585 bytes-rw-r--r--ant/org.eclipse.ant.ui/icons/full/eview16/ant_view.gifbin0 -> 119 bytes-rw-r--r--ant/org.eclipse.ant.ui/icons/full/obj16/ant.gifbin0 -> 119 bytes-rw-r--r--ant/org.eclipse.ant.ui/icons/full/obj16/ant_buildfile.gifbin0 -> 370 bytes-rw-r--r--ant/org.eclipse.ant.ui/icons/full/obj16/ant_target_err.gifbin0 -> 339 bytes-rw-r--r--ant/org.eclipse.ant.ui/icons/full/obj16/classpath.gifbin0 -> 330 bytes-rw-r--r--ant/org.eclipse.ant.ui/icons/full/obj16/defaulttarget_obj.gifbin0 -> 590 bytes-rw-r--r--ant/org.eclipse.ant.ui/icons/full/obj16/eclipse_obj.gifbin0 -> 308 bytes-rw-r--r--ant/org.eclipse.ant.ui/icons/full/obj16/import_obj.gifbin0 -> 185 bytes-rw-r--r--ant/org.eclipse.ant.ui/icons/full/obj16/macrodef_obj.gifbin0 -> 531 bytes-rw-r--r--ant/org.eclipse.ant.ui/icons/full/obj16/main_tab.gifbin0 -> 359 bytes-rw-r--r--ant/org.eclipse.ant.ui/icons/full/obj16/new_ant_project.gifbin0 -> 244 bytes-rw-r--r--ant/org.eclipse.ant.ui/icons/full/obj16/prop_ps.gifbin0 -> 578 bytes-rw-r--r--ant/org.eclipse.ant.ui/icons/full/obj16/property_obj.gifbin0 -> 204 bytes-rw-r--r--ant/org.eclipse.ant.ui/icons/full/obj16/targetinternal_obj.gifbin0 -> 374 bytes-rw-r--r--ant/org.eclipse.ant.ui/icons/full/obj16/targetpublic_obj.gifbin0 -> 363 bytes-rw-r--r--ant/org.eclipse.ant.ui/icons/full/obj16/task_obj.gifbin0 -> 82 bytes-rw-r--r--ant/org.eclipse.ant.ui/icons/full/obj16/taskdef_obj.gifbin0 -> 149 bytes-rw-r--r--ant/org.eclipse.ant.ui/icons/full/obj16/template_obj.gifbin0 -> 359 bytes-rw-r--r--ant/org.eclipse.ant.ui/icons/full/obj16/type.gifbin0 -> 139 bytes-rw-r--r--ant/org.eclipse.ant.ui/icons/full/ovr16/error_co.gifbin0 -> 82 bytes-rw-r--r--ant/org.eclipse.ant.ui/icons/full/ovr16/import_co.gifbin0 -> 68 bytes-rw-r--r--ant/org.eclipse.ant.ui/icons/full/ovr16/warning_co.gifbin0 -> 173 bytes-rw-r--r--ant/org.eclipse.ant.ui/icons/full/wizban/ant_wiz.pngbin0 -> 8041 bytes-rw-r--r--ant/org.eclipse.ant.ui/icons/full/wizban/export_ant_wiz.pngbin0 -> 9429 bytes-rw-r--r--ant/org.eclipse.ant.ui/templates/ant.properties28
-rw-r--r--ant/org.eclipse.ant.ui/templates/ant.xml167
-rw-r--r--ant/org.eclipse.ant.ui/templates/resolver.gifbin0 -> 986 bytes-rw-r--r--update/org.eclipse.update.configurator/.classpath7
-rw-r--r--update/org.eclipse.update.configurator/.cvsignore2
-rw-r--r--update/org.eclipse.update.configurator/.options5
-rw-r--r--update/org.eclipse.update.configurator/.project33
-rw-r--r--update/org.eclipse.update.configurator/.settings/org.eclipse.jdt.core.prefs81
-rw-r--r--update/org.eclipse.update.configurator/OSGI-INF/bundleGroup.xml7
-rw-r--r--update/org.eclipse.update.configurator/about.html28
-rw-r--r--update/org.eclipse.update.configurator/build.properties18
-rw-r--r--update/org.eclipse.update.configurator/plugin.properties13
-rw-r--r--update/org.eclipse.update.configurator/src/org/eclipse/update/configurator/package.html22
-rw-r--r--update/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/BundleManifest.java129
-rw-r--r--update/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/Configuration.java235
-rw-r--r--update/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/FeatureEntry.java367
-rw-r--r--update/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/FeatureParser.java135
-rw-r--r--update/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/FullFeatureParser.java150
-rw-r--r--update/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/IConfigurationConstants.java58
-rw-r--r--update/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/Locker.java21
-rw-r--r--update/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/Locker_JavaIo.java53
-rw-r--r--update/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/Locker_JavaNio.java71
-rw-r--r--update/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/Messages.java66
-rw-r--r--update/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/PlatformConfigurationFactory.java44
-rw-r--r--update/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/PluginEntry.java166
-rw-r--r--update/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/PluginParser.java129
-rw-r--r--update/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/SiteEntry.java771
-rw-r--r--update/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/SitePolicy.java59
-rw-r--r--update/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/UpdateURLDecoder.java36
-rw-r--r--update/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/VersionedIdentifier.java66
-rw-r--r--update/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/XMLPrintHandler.java133
-rw-r--r--update/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/branding/AboutInfo.java253
-rw-r--r--update/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/branding/IBundleGroupConstants.java65
-rw-r--r--update/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/branding/IProductConstants.java77
-rw-r--r--update/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/branding/IniFileReader.java366
-rw-r--r--update/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/messages.properties58
-rw-r--r--update/org.eclipse.update.core.linux/.classpath7
-rw-r--r--update/org.eclipse.update.core.linux/.cvsignore1
-rw-r--r--update/org.eclipse.update.core.linux/.project33
-rw-r--r--update/org.eclipse.update.core.linux/about.html28
-rw-r--r--update/org.eclipse.update.core.linux/build.properties16
-rw-r--r--update/org.eclipse.update.core.linux/os/linux/x86/libupdate.sobin0 -> 6268 bytes-rw-r--r--update/org.eclipse.update.core.linux/src/build.xml70
-rw-r--r--update/org.eclipse.update.core.linux/src/update.h76
-rw-r--r--update/org.eclipse.update.core.win32/.project22
-rw-r--r--update/org.eclipse.update.core.win32/about.html28
-rw-r--r--update/org.eclipse.update.core.win32/build.properties16
-rw-r--r--update/org.eclipse.update.core.win32/os/win32/ia64/update.dllbin0 -> 148992 bytes-rw-r--r--update/org.eclipse.update.core.win32/os/win32/x86/update.dllbin0 -> 36864 bytes-rw-r--r--update/org.eclipse.update.core.win32/src/build.xml74
-rw-r--r--update/org.eclipse.update.core.win32/src/make.bat17
-rw-r--r--update/org.eclipse.update.core.win32/src/setup.bat13
-rw-r--r--update/org.eclipse.update.core.win32/src/update.cpp381
-rw-r--r--update/org.eclipse.update.core.win32/src/update.h79
-rw-r--r--update/org.eclipse.update.core/.classpath8
-rw-r--r--update/org.eclipse.update.core/.cvsignore1
-rw-r--r--update/org.eclipse.update.core/.options9
-rw-r--r--update/org.eclipse.update.core/.project26
-rw-r--r--update/org.eclipse.update.core/.settings/org.eclipse.jdt.core.prefs86
-rw-r--r--update/org.eclipse.update.core/about.html28
-rw-r--r--update/org.eclipse.update.core/build.properties22
-rw-r--r--update/org.eclipse.update.core/customBuildCallbacks.xml193
-rw-r--r--update/org.eclipse.update.core/jarprocessor/org/eclipse/update/internal/jarprocessor/CommandStep.java73
-rw-r--r--update/org.eclipse.update.core/jarprocessor/org/eclipse/update/internal/jarprocessor/IProcessStep.java65
-rw-r--r--update/org.eclipse.update.core/jarprocessor/org/eclipse/update/internal/jarprocessor/JarProcessor.java393
-rw-r--r--update/org.eclipse.update.core/jarprocessor/org/eclipse/update/internal/jarprocessor/JarProcessorExecutor.java140
-rw-r--r--update/org.eclipse.update.core/jarprocessor/org/eclipse/update/internal/jarprocessor/Main.java117
-rw-r--r--update/org.eclipse.update.core/jarprocessor/org/eclipse/update/internal/jarprocessor/PackStep.java197
-rw-r--r--update/org.eclipse.update.core/jarprocessor/org/eclipse/update/internal/jarprocessor/PackUnpackStep.java88
-rw-r--r--update/org.eclipse.update.core/jarprocessor/org/eclipse/update/internal/jarprocessor/SignCommandStep.java101
-rw-r--r--update/org.eclipse.update.core/jarprocessor/org/eclipse/update/internal/jarprocessor/StreamProcessor.java53
-rw-r--r--update/org.eclipse.update.core/jarprocessor/org/eclipse/update/internal/jarprocessor/UnpackStep.java117
-rw-r--r--update/org.eclipse.update.core/jarprocessor/org/eclipse/update/internal/jarprocessor/Utils.java326
-rw-r--r--update/org.eclipse.update.core/jarprocessor/org/eclipse/update/internal/jarprocessor/ZipProcessor.java243
-rw-r--r--update/org.eclipse.update.core/jarprocessor/org/eclipse/update/internal/jarprocessor/pack-readme.html82
-rw-r--r--update/org.eclipse.update.core/preferences.ini8
-rw-r--r--update/org.eclipse.update.core/schema/featureTypes.exsd122
-rw-r--r--update/org.eclipse.update.core/schema/installHandlers.exsd113
-rw-r--r--update/org.eclipse.update.core/schema/siteTypes.exsd119
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/BaseSiteLocalFactory.java55
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/ConfigurationActivity.java52
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/ConfigurationPolicy.java524
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/ConfiguredSite.java1136
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/ContentConsumer.java24
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/CoreExceptionWithRootCause.java35
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/DefaultInstallHandler.java148
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/DeltaInstallHandler.java177
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/Digest.java54
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/DigestContentProvider.java87
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/DigestParser.java169
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/EmptyDirectoryException.java27
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/ErrorRecoveryLog.java270
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/ExtendedSite.java155
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/ExtendedSiteURLFactory.java25
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/FatalIOException.java21
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/FeatureContentConsumer.java26
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/FeatureDownloadException.java39
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/FeatureEntryWrapper.java77
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/FeatureExecutableContentConsumer.java188
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/FeatureExecutableContentProvider.java263
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/FeatureExecutableFactory.java132
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/FeaturePackagedContentProvider.java466
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/FeaturePackagedFactory.java82
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/FeaturePlugin.java46
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/FeatureTypeFactory.java89
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/FileFragment.java30
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/FragmentEntry.java71
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/ISiteContentConsumer.java66
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/InstallConfiguration.java974
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/InstallHandlerProxy.java613
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/InstallLogParser.java245
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/InstallRegistry.java183
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/InternalSiteManager.java396
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/JarDeltaInstallHandler.java141
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/LiteFeature.java27
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/LiteFeatureFactory.java37
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/LocalSite.java374
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/LockManager.java39
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/Messages.java289
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/NonPluginEntryContentConsumer.java55
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/NullContentReference.java90
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/PatchedFeature.java106
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/PluginEntryContentConsumer.java55
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/ProductProvider.java45
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/SiteContentConsumer.java45
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/SiteFile.java424
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/SiteFileContentConsumer.java313
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/SiteFileContentProvider.java32
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/SiteFileFactory.java446
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/SiteFileNonPluginContentConsumer.java76
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/SiteFilePackedPluginContentConsumer.java135
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/SiteFilePluginContentConsumer.java189
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/SiteReconciler.java347
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/SiteStatusAnalyzer.java463
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/SiteTypeFactory.java90
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/SiteURLContentProvider.java32
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/SiteURLFactory.java118
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/TargetFeature.java56
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/URLEncoder.java152
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/URLKey.java76
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/UpdateCore.java320
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/UpdateManagerLogWriter.java301
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/UpdateManagerUtils.java964
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/UpdatePreferencesInitializer.java51
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/UpdateSession.java50
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/UpdateSiteFeatureReference.java137
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/UpdateSiteIncludedFeatureReference.java146
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/Volume.java71
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/connection/AbstractResponse.java69
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/connection/ConnectionFactory.java34
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/connection/ConnectionThreadManager.java231
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/connection/ConnectionThreadManagerFactory.java29
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/connection/FileResponse.java62
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/connection/HttpResponse.java251
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/connection/IResponse.java76
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/connection/OtherResponse.java96
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/connection/TooManyOpenConnectionsException.java25
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/core/messages.properties279
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/mirror/MirrorCommand.java246
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/mirror/MirrorSite.java822
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/mirror/MirrorSiteFactory.java234
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/model/BundleManifest.java111
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/model/ConfigurationActivityModel.java115
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/model/ConfigurationPolicyModel.java280
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/model/ConfiguredSiteModel.java177
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/model/DefaultPluginParser.java107
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/model/ITimestamp.java21
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/model/InstallConfigurationModel.java327
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/model/InstallConfigurationParser.java218
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/model/SiteLocalModel.java286
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/model/SiteLocalParser.java138
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/model/SiteWithTimestamp.java264
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/operations/BatchFeatureOperation.java76
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/operations/BatchInstallOperation.java120
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/operations/ConfigOperation.java78
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/operations/ConfigureFeaturesOperation.java31
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/operations/DuplicateConflictsValidator.java225
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/operations/FeatureHierarchyElement.java446
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/operations/FeatureOperation.java75
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/operations/FeatureStatus.java57
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/operations/IBatchFeatureOperation.java35
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/operations/IConfigureFeaturesOperation.java15
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/operations/IUnconfigureAndUninstallFeatureOperation.java18
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/operations/IUnconfigureAndUninstallFeaturesOperation.java16
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/operations/IUnconfigureFeaturesOperation.java16
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/operations/IUninstallFeaturesOperation.java15
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/operations/InstallOperation.java168
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/operations/JobRoot.java101
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/operations/Operation.java31
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/operations/OperationFactory.java108
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/operations/OperationValidator.java1397
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/operations/PatchCleaner.java64
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/operations/ReplaceFeatureVersionOperation.java100
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/operations/RevertConfigurationOperation.java54
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/operations/ToggleSiteOperation.java58
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/operations/UnconfigOperation.java82
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/operations/UnconfigureAndUninstallFeatureOperation.java71
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/operations/UnconfigureAndUninstallFeaturesOperation.java30
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/operations/UnconfigureFeaturesOperation.java29
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/operations/UninstallFeaturesOperation.java31
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/operations/UninstallOperation.java80
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/operations/UpdateUtils.java692
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/provisional/SiteOptimizerApplication.java907
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/search/BaseSearchCategory.java30
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/search/OptionalFeatureSearchCategory.java98
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/search/QueryUpdateSiteAdapter.java28
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/search/SiteSearchCategory.java249
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/search/UpdatePolicy.java316
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/search/UpdateSiteAdapter.java45
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/search/UpdatesSearchCategory.java571
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/security/CertificatePair.java73
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/security/JarVerificationResult.java334
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/security/JarVerifier.java457
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/security/KeyStores.java219
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/security/KeystoreHandle.java62
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/verifier/CertVerificationResult.java259
-rw-r--r--update/org.eclipse.update.core/src/org/eclipse/update/internal/verifier/CertVerifier.java271
-rw-r--r--update/org.eclipse.update.examples/.classpath7
-rw-r--r--update/org.eclipse.update.examples/.cvsignore1
-rw-r--r--update/org.eclipse.update.examples/.project33
-rw-r--r--update/org.eclipse.update.examples/.settings/org.eclipse.jdt.core.prefs64
-rw-r--r--update/org.eclipse.update.examples/META-INF/MANIFEST.MF13
-rw-r--r--update/org.eclipse.update.examples/Scrapbook2.jpage111
-rw-r--r--update/org.eclipse.update.examples/about.html42
-rw-r--r--update/org.eclipse.update.examples/build.properties17
-rw-r--r--update/org.eclipse.update.examples/plugin.properties13
-rw-r--r--update/org.eclipse.update.examples/plugin.xml36
-rw-r--r--update/org.eclipse.update.examples/site/features/com.reddot.reddot_1.0.0.jarbin0 -> 10284 bytes-rw-r--r--update/org.eclipse.update.examples/site/features/com.reddot.reddot_2.0.0.jarbin0 -> 16134 bytes-rw-r--r--update/org.eclipse.update.examples/site/info/images/redDot.jpgbin0 -> 1859 bytes-rw-r--r--update/org.eclipse.update.examples/site/plugins/com.reddot.reddot_1.0.0.jarbin0 -> 3149 bytes-rw-r--r--update/org.eclipse.update.examples/site/plugins/com.reddot.reddot_2.0.0.jarbin0 -> 3152 bytes-rw-r--r--update/org.eclipse.update.examples/site/site.xml29
-rw-r--r--update/org.eclipse.update.examples/src/org/eclipse/update/examples/buildzip/BuildZipConverter.java162
-rw-r--r--update/org.eclipse.update.examples/src/org/eclipse/update/examples/buildzip/BuildZipFeatureContentProvider.java261
-rw-r--r--update/org.eclipse.update.examples/src/org/eclipse/update/examples/buildzip/BuildZipFeatureFactory.java68
-rw-r--r--update/org.eclipse.update.examples/src/org/eclipse/update/examples/buildzip/BuildZipFeatureParser.java208
-rw-r--r--update/org.eclipse.update.examples/src/org/eclipse/update/examples/buildzip/BuildZipPluginParser.java88
-rw-r--r--update/org.eclipse.update.examples/src/org/eclipse/update/examples/buildzip/BuildZipSiteContentProvider.java36
-rw-r--r--update/org.eclipse.update.examples/src/org/eclipse/update/examples/buildzip/BuildZipSiteFactory.java90
-rw-r--r--update/org.eclipse.update.examples/src/org/eclipse/update/examples/buildzip/DefaultModelWriter.java233
-rw-r--r--update/org.eclipse.update.examples/src/org/eclipse/update/examples/buildzip/Test.java60
-rw-r--r--update/org.eclipse.update.examples/src/org/eclipse/update/examples/buildzip/java.page.jpage45
-rw-r--r--update/org.eclipse.update.examples/src/org/eclipse/update/examples/freeform/FreeFormSiteContentProvider.java44
-rw-r--r--update/org.eclipse.update.examples/src/org/eclipse/update/examples/freeform/FreeFormSiteFactory.java79
-rw-r--r--update/org.eclipse.update.scheduler/.classpath7
-rw-r--r--update/org.eclipse.update.scheduler/.cvsignore1
-rw-r--r--update/org.eclipse.update.scheduler/.project26
-rw-r--r--update/org.eclipse.update.scheduler/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--update/org.eclipse.update.scheduler/about.html28
-rw-r--r--update/org.eclipse.update.scheduler/build.properties17
-rw-r--r--update/org.eclipse.update.scheduler/plugin.properties18
-rw-r--r--update/org.eclipse.update.scheduler/plugin.xml35
-rw-r--r--update/org.eclipse.update.scheduler/src/org/eclipse/update/internal/scheduler/AutomaticUpdateJob.java29
-rw-r--r--update/org.eclipse.update.scheduler/src/org/eclipse/update/internal/scheduler/ScheduledPluginUninstall.java98
-rw-r--r--update/org.eclipse.update.scheduler/src/org/eclipse/update/internal/scheduler/SchedulerStartup.java273
-rw-r--r--update/org.eclipse.update.scheduler/src/org/eclipse/update/internal/scheduler/UpdateJobChangeAdapter.java112
-rw-r--r--update/org.eclipse.update.scheduler/src/org/eclipse/update/internal/scheduler/UpdateSchedulerMessages.java67
-rw-r--r--update/org.eclipse.update.scheduler/src/org/eclipse/update/internal/scheduler/UpdateSchedulerPlugin.java155
-rw-r--r--update/org.eclipse.update.scheduler/src/org/eclipse/update/internal/scheduler/UpdateSchedulerResources.properties53
-rw-r--r--update/org.eclipse.update.scheduler/src/org/eclipse/update/internal/scheduler/preferences/AutomaticUpdatesPreferencePage.java240
-rw-r--r--update/org.eclipse.update.scheduler/src/org/eclipse/update/internal/scheduler/preferences/PreferenceInitializer.java34
-rw-r--r--update/org.eclipse.update.tests.core/.classpath7
-rw-r--r--update/org.eclipse.update.tests.core/.cvsignore1
-rw-r--r--update/org.eclipse.update.tests.core/.project38
-rw-r--r--update/org.eclipse.update.tests.core/.settings/org.eclipse.jdt.core.prefs64
-rw-r--r--update/org.eclipse.update.tests.core/META-INF/MANIFEST.MF38
-rw-r--r--update/org.eclipse.update.tests.core/about.html28
-rw-r--r--update/org.eclipse.update.tests.core/data/ExecutableFeaturePackagedSite/data/features/feature3/feature.xml12
-rw-r--r--update/org.eclipse.update.tests.core/data/ExecutableFeaturePackagedSite/data/plugins/Pde_core.jarbin0 -> 65389 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/ExecutableFeaturePackagedSite/data/plugins/help.jarbin0 -> 364483 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/ExecutableFeaturePackagedSite/data/plugins/junit_3.7.jarbin0 -> 258684 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/ExecutableFeaturePackagedSite/data/plugins/org.eclipse.update.plugin1_1.1.1/plugin.xml8
-rw-r--r--update/org.eclipse.update.tests.core/data/ExecutableFeaturePackagedSite/data/plugins/org.eclipse.update.plugin1_1.1.1/src.jarbin0 -> 627 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/ExecutableFeaturePackagedSite/data2/features/feature3/feature.xml12
-rw-r--r--update/org.eclipse.update.tests.core/data/ExecutableFeaturePackagedSite/data2/features/helpFeature.jarbin0 -> 62496 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/ExecutableFeaturePackagedSite/data2/features/org.eclipse.pde.feature_1.0.0.jarbin0 -> 60984 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/ExecutableFeaturePackagedSite/data2/info/img/top_titlsm.gifbin0 -> 3083 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/ExecutableFeaturePackagedSite/data2/info/img/wel_ml.jpgbin0 -> 11159 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/ExecutableFeaturePackagedSite/data2/info/siteInfo.html63
-rw-r--r--update/org.eclipse.update.tests.core/data/ExecutableFeaturePackagedSite/data2/plugins/Pde_core.jarbin0 -> 65389 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/ExecutableFeaturePackagedSite/data2/plugins/help.jarbin0 -> 364483 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/ExecutableFeaturePackagedSite/data2/plugins/junit_3.7.jarbin0 -> 258684 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/ExecutableFeaturePackagedSite/data2/plugins/org.eclipse.update.plugin1_1.1.1/plugin.xml8
-rw-r--r--update/org.eclipse.update.tests.core/data/ExecutableFeaturePackagedSite/data2/plugins/org.eclipse.update.plugin1_1.1.1/src.jarbin0 -> 627 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/ExecutableFeaturePackagedSite/data2/site.xml22
-rw-r--r--update/org.eclipse.update.tests.core/data/FTPLikeSite/site.xml4
-rw-r--r--update/org.eclipse.update.tests.core/data/FeatureTypeExamples/site1/features/feature3/feature.xml12
-rw-r--r--update/org.eclipse.update.tests.core/data/FeatureTypeExamples/site1/site.xml4
-rw-r--r--update/org.eclipse.update.tests.core/data/FeatureTypeExamples/site2/features/feature3/features2.jarfilebin0 -> 1401 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/FeatureTypeExamples/site2/site.xml4
-rw-r--r--update/org.eclipse.update.tests.core/data/FeatureTypeExamples/site3/features/feature3/features2.jarfilebin0 -> 1401 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/FeatureTypeExamples/site3/site.xml4
-rw-r--r--update/org.eclipse.update.tests.core/data/Site with space/features space/helpFeature.jarbin0 -> 62502 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/Site with space/features space/space feature.jarbin0 -> 61392 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/Site with space/info/img/top_titlsm.gifbin0 -> 3083 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/Site with space/info/img/wel_ml.jpgbin0 -> 11159 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/Site with space/info/siteInfo.html63
-rw-r--r--update/org.eclipse.update.tests.core/data/Site with space/install/features space/feature3/feature.xml12
-rw-r--r--update/org.eclipse.update.tests.core/data/Site with space/plugins space/Pde_core.jarbin0 -> 65389 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/Site with space/plugins space/help.jarbin0 -> 364483 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/Site with space/plugins space/junit_3.7.jarbin0 -> 258684 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/Site with space/plugins space/org.eclipse.update.plugin1_1.1.1/plugin.xml8
-rw-r--r--update/org.eclipse.update.tests.core/data/Site with space/plugins space/org.eclipse.update.plugin1_1.1.1/src.jarbin0 -> 627 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/Site with space/site.xml22
-rw-r--r--update/org.eclipse.update.tests.core/data/SiteTypeExamples/site1/features/feature3/features2.jarfilebin0 -> 1401 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/SiteTypeExamples/site1/site.xml4
-rw-r--r--update/org.eclipse.update.tests.core/data/SiteURLTest/data/artifacts/features/helpFeature.jarbin0 -> 62404 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/SiteURLTest/data/artifacts/features/org.eclipse.pde.feature_1.0.0.jarbin0 -> 60998 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/SiteURLTest/data/artifacts/plugins/Pde_core.jarbin0 -> 65389 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/SiteURLTest/data/artifacts/plugins/help.jarbin0 -> 364483 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/SiteURLTest/data/artifacts/plugins/junit_3.7.jarbin0 -> 258684 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/SiteURLTest/data/info/img/top_titlsm.gifbin0 -> 3083 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/SiteURLTest/data/info/img/wel_ml.jpgbin0 -> 11159 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/SiteURLTest/data/info/siteInfo.html63
-rw-r--r--update/org.eclipse.update.tests.core/data/SiteURLTest/data/site.xml18
-rw-r--r--update/org.eclipse.update.tests.core/data/dataEntrySiteTest/site1/file1.zipbin0 -> 163 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/dataEntrySiteTest/site1/install/features/feature3/feature.xml5
-rw-r--r--update/org.eclipse.update.tests.core/data/dataEntrySiteTest/site1/site.xml7
-rw-r--r--update/org.eclipse.update.tests.core/data/dataEntrySiteTest/site2/features/features3.jarbin0 -> 986 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/dataEntrySiteTest/site2/non data/another file.zipbin0 -> 163 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/dataEntrySiteTest/site2/site.xml7
-rw-r--r--update/org.eclipse.update.tests.core/data/features/features2.jarbin0 -> 1478 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/features/org.eclipse.test.feature_1.0.0.jarbin0 -> 909 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/features/org.eclipse.update.core.tests.feature1_1.0.4.jarbin0 -> 839 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/features/org.eclipse_test_feature.jarbin0 -> 928 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/mirrors/update-site1/.project17
-rw-r--r--update/org.eclipse.update.tests.core/data/mirrors/update-site1/.sitebuild/build.log318
-rw-r--r--update/org.eclipse.update.tests.core/data/mirrors/update-site1/.sitebuild/sitebuild.xml11
-rw-r--r--update/org.eclipse.update.tests.core/data/mirrors/update-site1/features/update.feature1_1.0.0.jarbin0 -> 660 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/mirrors/update-site1/features/update.feature2_1.0.0.jarbin0 -> 661 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/mirrors/update-site1/features/update.feature3_1.0.0.jarbin0 -> 667 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/mirrors/update-site1/plugins/com.plugin1_1.0.0.jarbin0 -> 953 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/mirrors/update-site1/plugins/com.plugin2_1.0.0.jarbin0 -> 1341 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/mirrors/update-site1/plugins/com.plugin3_1.0.0.jarbin0 -> 1730 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/mirrors/update-site1/plugins/com.plugin4_1.0.0.jarbin0 -> 2118 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/mirrors/update-site1/site.xml27
-rw-r--r--update/org.eclipse.update.tests.core/data/mirrors/update-site2/.project17
-rw-r--r--update/org.eclipse.update.tests.core/data/mirrors/update-site2/.sitebuild/build.log203
-rw-r--r--update/org.eclipse.update.tests.core/data/mirrors/update-site2/.sitebuild/sitebuild.xml10
-rw-r--r--update/org.eclipse.update.tests.core/data/mirrors/update-site2/features/update.feature1_1.0.0.jarbin0 -> 659 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/mirrors/update-site2/features/update.feature2_1.0.0.jarbin0 -> 661 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/mirrors/update-site2/plugins/com.plugin1_1.0.0.jarbin0 -> 953 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/mirrors/update-site2/plugins/com.plugin2_1.0.0.jarbin0 -> 1341 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/mirrors/update-site2/site.xml5
-rw-r--r--update/org.eclipse.update.tests.core/data/mirrors/update-site3/.project17
-rw-r--r--update/org.eclipse.update.tests.core/data/mirrors/update-site3/.sitebuild/build.log318
-rw-r--r--update/org.eclipse.update.tests.core/data/mirrors/update-site3/.sitebuild/sitebuild.xml10
-rw-r--r--update/org.eclipse.update.tests.core/data/mirrors/update-site3/features/update.feature1b_2.0.0.jarbin0 -> 672 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/mirrors/update-site3/features/update.feature2b_2.0.0.jarbin0 -> 672 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/mirrors/update-site3/plugins/com.plugin1_1.0.0.jarbin0 -> 953 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/mirrors/update-site3/plugins/com.plugin1a_1.0.1.jarbin0 -> 1344 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/mirrors/update-site3/plugins/com.plugin2_1.0.0.jarbin0 -> 2123 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/mirrors/update-site3/plugins/com.plugin2a_1.0.1.jarbin0 -> 1736 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/mirrors/update-site3/site.xml19
-rw-r--r--update/org.eclipse.update.tests.core/data/mirrors/update-site4/.project17
-rw-r--r--update/org.eclipse.update.tests.core/data/mirrors/update-site4/.sitebuild/build.log791
-rw-r--r--update/org.eclipse.update.tests.core/data/mirrors/update-site4/.sitebuild/sitebuild.xml9
-rw-r--r--update/org.eclipse.update.tests.core/data/mirrors/update-site4/features/update.feature1_1.0.0.jarbin0 -> 660 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/mirrors/update-site4/features/update.feature1_1.0.1.jarbin0 -> 505 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/mirrors/update-site4/features/update.feature1b_2.0.0.jarbin0 -> 672 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/mirrors/update-site4/features/update.feature1c_3.0.0.jarbin0 -> 614 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/mirrors/update-site4/plugins/com.plugin1_1.0.0.jarbin0 -> 953 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/mirrors/update-site4/plugins/com.plugin1a_1.0.1.jarbin0 -> 1344 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/mirrors/update-site4/site.xml11
-rw-r--r--update/org.eclipse.update.tests.core/data/mirrors/update-site5/.project17
-rw-r--r--update/org.eclipse.update.tests.core/data/mirrors/update-site5/.sitebuild/build.log791
-rw-r--r--update/org.eclipse.update.tests.core/data/mirrors/update-site5/.sitebuild/sitebuild.xml10
-rw-r--r--update/org.eclipse.update.tests.core/data/mirrors/update-site5/features/update.feature1_1.0.0.jarbin0 -> 660 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/mirrors/update-site5/features/update.feature1_1.0.1.jarbin0 -> 505 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/mirrors/update-site5/features/update.feature1b_2.0.0.jarbin0 -> 672 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/mirrors/update-site5/features/update.feature1c_3.0.0.jarbin0 -> 614 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/mirrors/update-site5/features/update.feature2_1.0.0.jarbin0 -> 661 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/mirrors/update-site5/features/update.feature2b_2.0.0.jarbin0 -> 672 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/mirrors/update-site5/features/update.feature2c_3.0.0.jarbin0 -> 614 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/mirrors/update-site5/plugins/com.plugin1_1.0.0.jarbin0 -> 954 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/mirrors/update-site5/plugins/com.plugin1a_1.0.1.jarbin0 -> 1346 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/mirrors/update-site5/plugins/com.plugin2_1.0.0.jarbin0 -> 2127 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/mirrors/update-site5/plugins/com.plugin2a_1.0.1.jarbin0 -> 2128 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/mirrors/update-site5/site.xml19
-rw-r--r--update/org.eclipse.update.tests.core/data/nestedFeatureSiteTest/features/org.eclipse.update.core.tests.childrenfeature_2.0.0.jarbin0 -> 770 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/nestedFeatureSiteTest/features/rootfeature.jarbin0 -> 756 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/nestedFeatureSiteTest/plugins/org.eclipse.update.core.tests.feature1.plugin1_3.5.6.jarbin0 -> 985 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/nestedFeatureSiteTest/plugins/org.eclipse.update.core.tests.feature1.plugin2_5.0.0.jarbin0 -> 986 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/nestedFeatureSiteTest/plugins/org.eclipse.update.core.tests.feature1.plugin2_5.0.1.jarbin0 -> 985 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/nestedFeatureSiteTest/site.xml4
-rw-r--r--update/org.eclipse.update.tests.core/data/nestedFeatureSiteTest2/features/childrenfeature.jarbin0 -> 778 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/nestedFeatureSiteTest2/features/rootfeature.jarbin0 -> 773 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/nestedFeatureSiteTest2/plugins/org.eclipse.update.core.tests.feature1.plugin1_3.5.6.jarbin0 -> 985 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/nestedFeatureSiteTest2/plugins/org.eclipse.update.core.tests.feature1.plugin2_5.0.0.jarbin0 -> 986 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/nestedFeatureSiteTest2/plugins/org.eclipse.update.core.tests.feature1.plugin2_5.0.1.jarbin0 -> 985 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/nestedFeatureSiteTest2/site.xml7
-rw-r--r--update/org.eclipse.update.tests.core/data/nestedFeatureSiteTest3/features/childrenfeature.jarbin0 -> 826 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/nestedFeatureSiteTest3/features/rootfeature.jarbin0 -> 797 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/nestedFeatureSiteTest3/plugins/org.eclipse.update.core.tests.feature1.plugin1_3.5.6.jarbin0 -> 985 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/nestedFeatureSiteTest3/plugins/org.eclipse.update.core.tests.feature1.plugin2_5.0.0.jarbin0 -> 986 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/nestedFeatureSiteTest3/plugins/org.eclipse.update.core.tests.feature1.plugin2_5.0.1.jarbin0 -> 985 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/nestedFeatureSiteTest3/site.xml6
-rw-r--r--update/org.eclipse.update.tests.core/data/parsertests/feature1.xml25
-rw-r--r--update/org.eclipse.update.tests.core/data/parsertests/feature1bis.xml25
-rw-r--r--update/org.eclipse.update.tests.core/data/parsertests/feature2.xml24
-rw-r--r--update/org.eclipse.update.tests.core/data/parsertests/feature3.xml25
-rw-r--r--update/org.eclipse.update.tests.core/data/parsertests/feature4.xml26
-rw-r--r--update/org.eclipse.update.tests.core/data/parsertests/reddot.xml19
-rw-r--r--update/org.eclipse.update.tests.core/data/parsertests/reddot1.xml18
-rw-r--r--update/org.eclipse.update.tests.core/data/parsertests/site.xml40
-rw-r--r--update/org.eclipse.update.tests.core/data/parsertests/site10.xml12
-rw-r--r--update/org.eclipse.update.tests.core/data/parsertests/site2.xml4
-rw-r--r--update/org.eclipse.update.tests.core/data/parsertests/site3.xml6
-rw-r--r--update/org.eclipse.update.tests.core/data/parsertests/site4.xml20
-rw-r--r--update/org.eclipse.update.tests.core/data/parsertests/site7.xml42
-rw-r--r--update/org.eclipse.update.tests.core/data/parsertests/site8.xml41
-rw-r--r--update/org.eclipse.update.tests.core/data/parsertests/site9.xml40
-rw-r--r--update/org.eclipse.update.tests.core/data/parsertests/siteftp.xml4
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/FeatureWithInstallHandler/.classpath9
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/FeatureWithInstallHandler/.project23
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/FeatureWithInstallHandler/FeatureWithInstallHandler_1.0.0.jarbin0 -> 2137 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/FeatureWithInstallHandler/bin/HandlerWithUI$1.classbin0 -> 854 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/FeatureWithInstallHandler/bin/HandlerWithUI.classbin0 -> 3461 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/FeatureWithInstallHandler/build.properties15
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/FeatureWithInstallHandler/feature.xml27
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/FeatureWithInstallHandler/handler.jarbin0 -> 3072 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/FeatureWithInstallHandler/src/HandlerWithUI.java145
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.emf.doc_2.0.0/META-INF/MANIFEST.MF2
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.emf.doc_2.0.0/cpl-v10.html266
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.emf.doc_2.0.0/eclipse_update_120.jpgbin0 -> 14641 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.emf.doc_2.0.0/feature.properties151
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.emf.doc_2.0.0/feature.xml46
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.emf.doc_2.0.0/license.html126
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.emf.ecore.sdo.doc_2.0.0/META-INF/MANIFEST.MF2
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.emf.ecore.sdo.doc_2.0.0/cpl-v10.html125
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.emf.ecore.sdo.doc_2.0.0/eclipse_update_120.jpgbin0 -> 14692 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.emf.ecore.sdo.doc_2.0.0/feature.properties151
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.emf.ecore.sdo.doc_2.0.0/feature.xml46
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.emf.ecore.sdo.doc_2.0.0/license.html71
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.emf.ecore.sdo.source_2.0.0/META-INF/MANIFEST.MF2
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.emf.ecore.sdo.source_2.0.0/cpl-v10.html125
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.emf.ecore.sdo.source_2.0.0/eclipse_update_120.jpgbin0 -> 14692 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.emf.ecore.sdo.source_2.0.0/feature.properties151
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.emf.ecore.sdo.source_2.0.0/feature.xml21
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.emf.ecore.sdo.source_2.0.0/license.html71
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.emf.ecore.sdo_2.0.0/META-INF/MANIFEST.MF2
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.emf.ecore.sdo_2.0.0/cpl-v10.html125
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.emf.ecore.sdo_2.0.0/eclipse_update_120.jpgbin0 -> 14692 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.emf.ecore.sdo_2.0.0/feature.properties154
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.emf.ecore.sdo_2.0.0/feature.xml59
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.emf.ecore.sdo_2.0.0/license.html71
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.emf.sdk_2.0.0/META-INF/MANIFEST.MF2
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.emf.sdk_2.0.0/cpl-v10.html266
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.emf.sdk_2.0.0/eclipse_update_120.jpgbin0 -> 14641 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.emf.sdk_2.0.0/feature.properties140
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.emf.sdk_2.0.0/feature.xml86
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.emf.sdk_2.0.0/license.html126
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.emf.source_2.0.0/META-INF/MANIFEST.MF2
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.emf.source_2.0.0/cpl-v10.html266
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.emf.source_2.0.0/eclipse_update_120.jpgbin0 -> 14641 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.emf.source_2.0.0/feature.properties151
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.emf.source_2.0.0/feature.xml21
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.emf.source_2.0.0/license.html126
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.emf_2.0.0/META-INF/MANIFEST.MF2
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.emf_2.0.0/cpl-v10.html266
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.emf_2.0.0/eclipse_update_120.jpgbin0 -> 14641 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.emf_2.0.0/feature.properties154
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.emf_2.0.0/feature.xml148
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.emf_2.0.0/license.html126
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.jdt-feature/.project17
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.jdt-feature/cpl-v10.html125
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.jdt-feature/eclipse_update_120.jpgbin0 -> 14641 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.jdt-feature/feature.xml113
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.jdt-feature/license.html72
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.jdt.source-feature/.project17
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.jdt.source-feature/cpl-v10.html125
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.jdt.source-feature/eclipse_update_120.jpgbin0 -> 14641 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.jdt.source-feature/feature.xml16
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.jdt.source-feature/license.html72
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.pde-feature/.project17
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.pde-feature/cpl-v10.html125
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.pde-feature/eclipse_update_120.jpgbin0 -> 14641 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.pde-feature/feature.xml69
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.pde-feature/license.html72
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.pde.source-feature/.project17
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.pde.source-feature/cpl-v10.html125
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.pde.source-feature/eclipse_update_120.jpgbin0 -> 14641 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.pde.source-feature/feature.xml14
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.pde.source-feature/license.html72
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.platform-feature/.project17
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.platform-feature/cpl-v10.html125
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.platform-feature/eclipse_update_120.jpgbin0 -> 14641 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.platform-feature/feature.xml387
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.platform-feature/license.html72
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.platform.source-feature/.project17
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.platform.source-feature/cpl-v10.html125
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.platform.source-feature/eclipse_update_120.jpgbin0 -> 14641 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.platform.source-feature/feature.xml26
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.platform.source-feature/license.html72
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.sdk-feature/.project17
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.sdk-feature/cpl-v10.html125
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.sdk-feature/eclipse_update_120.jpgbin0 -> 14641 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.sdk-feature/feature.xml30
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.sdk-feature/license.html72
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.xsd.doc_2.0.0/META-INF/MANIFEST.MF2
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.xsd.doc_2.0.0/cpl-v10.html125
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.xsd.doc_2.0.0/eclipse_update_120.jpgbin0 -> 14641 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.xsd.doc_2.0.0/feature.properties151
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.xsd.doc_2.0.0/feature.xml48
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.xsd.doc_2.0.0/license.html71
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.xsd.source_2.0.0/META-INF/MANIFEST.MF2
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.xsd.source_2.0.0/cpl-v10.html125
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.xsd.source_2.0.0/eclipse_update_120.jpgbin0 -> 14641 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.xsd.source_2.0.0/feature.properties151
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.xsd.source_2.0.0/feature.xml48
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.xsd.source_2.0.0/license.html71
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.xsd_2.0.0/META-INF/MANIFEST.MF2
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.xsd_2.0.0/cpl-v10.html125
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.xsd_2.0.0/eclipse_update_120.jpgbin0 -> 14641 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.xsd_2.0.0/feature.properties154
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.xsd_2.0.0/feature.xml71
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/eclipse/features/org.eclipse.xsd_2.0.0/license.html71
-rw-r--r--update/org.eclipse.update.tests.core/data/perf/platform.xml179
-rw-r--r--update/org.eclipse.update.tests.core/data/plugins/org.eclipse.update.core.feature1.plugin1_1.1.1.jarbin0 -> 460 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/plugins/org.eclipse.update.core.feature2.plugin2_2.2.2.jarbin0 -> 460 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/plugins/org.eclipse.update.core.tests.dummy_7.9.8.jarbin0 -> 5931 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/plugins/org.eclipse.update.core.tests.feature1.plugin1_3.5.6.jarbin0 -> 973 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/plugins/org.eclipse.update.core.tests.feature1.plugin2_5.0.0.jarbin0 -> 974 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/plugins/org.eclipse.update.plugin1_1.1.1/plugin.xml8
-rw-r--r--update/org.eclipse.update.tests.core/data/plugins/org.eclipse.update.plugin1_1.1.1/src.jarbin0 -> 627 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/reconciliationSites/site1/install/features/feature3/feature.xml12
-rw-r--r--update/org.eclipse.update.tests.core/data/reconciliationSites/site1/plugins/org.eclipse.update.plugin1_1.1.1/plugin.xml8
-rw-r--r--update/org.eclipse.update.tests.core/data/reconciliationSites/site1/plugins/org.eclipse.update.plugin1_1.1.1/src.jarbin0 -> 627 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/reconciliationSites/site2/install/features/feature3/feature.xml12
-rw-r--r--update/org.eclipse.update.tests.core/data/reconciliationSites/site2/plugins/org.eclipse.update.core_2.0.0/plugin.xml8
-rw-r--r--update/org.eclipse.update.tests.core/data/reconciliationSites/site2/plugins/org.eclipse.update.core_2.0.0/src.jarbin0 -> 627 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/site.xml19
-rw-r--r--update/org.eclipse.update.tests.core/data/site2/site.xml6
-rw-r--r--update/org.eclipse.update.tests.core/data/siteTestLocalSite/plugins/bundleAndPluginManifests_1.0.3/META-INF/MANIFEST.MF12
-rw-r--r--update/org.eclipse.update.tests.core/data/siteTestLocalSite/plugins/bundleAndPluginManifests_1.0.3/plugin.xml3
-rw-r--r--update/org.eclipse.update.tests.core/data/siteTestLocalSite/plugins/bundleManifest_1.0.1/META-INF/MANIFEST.MF12
-rw-r--r--update/org.eclipse.update.tests.core/data/siteTestLocalSite/plugins/feature1_plugin2_5.0.0/plugin.xml8
-rw-r--r--update/org.eclipse.update.tests.core/data/siteTestLocalSite/plugins/feature1_plugin2_5.0.0/src.jarbin0 -> 627 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/siteTestLocalSite/plugins/feature1_plugin2_5.0.1/plugin.xml8
-rw-r--r--update/org.eclipse.update.tests.core/data/siteTestLocalSite/plugins/feature1_plugin2_5.0.1/src.jarbin0 -> 627 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/siteTestLocalSite/plugins/notBundleManifest_1.0.2/META-INF/MANIFEST.MF9
-rw-r--r--update/org.eclipse.update.tests.core/data/testAPI/features/feature3/feature.xml12
-rw-r--r--update/org.eclipse.update.tests.core/data/testAPI/plugins/org.eclipse.update.plugin1_1.1.1/plugin.xml8
-rw-r--r--update/org.eclipse.update.tests.core/data/testAPI/plugins/org.eclipse.update.plugin1_1.1.1/src.jarbin0 -> 627 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/testAPI/site.xml19
-rw-r--r--update/org.eclipse.update.tests.core/data/validation/site2/.eclipseproduct3
-rw-r--r--update/org.eclipse.update.tests.core/data/validation/site3/.eclipseextension1
-rw-r--r--update/org.eclipse.update.tests.core/data/validation/site4/eclipse/.eclipseextension1
-rw-r--r--update/org.eclipse.update.tests.core/data/validation/site5/.eclipseUM3
-rw-r--r--update/org.eclipse.update.tests.core/data/validation/site5/eclipse/.eclipseextension3
-rw-r--r--update/org.eclipse.update.tests.core/data/validation/site6/.eclipseUM1
-rw-r--r--update/org.eclipse.update.tests.core/data/validation/site6/children/children/eclipse/.eclipseextension1
-rw-r--r--update/org.eclipse.update.tests.core/data/xmls/apitests/org.eclipse.test.feature_1.0.0/feature.xml13
-rw-r--r--update/org.eclipse.update.tests.core/data/xmls/apitests/org.eclipse_test_feature/feature.xml13
-rw-r--r--update/org.eclipse.update.tests.core/data/xmls/feature_1.0.0/feature.xml13
-rw-r--r--update/org.eclipse.update.tests.core/data/xmls/feature_1.0.0/feature1.gifbin0 -> 121 bytes-rw-r--r--update/org.eclipse.update.tests.core/data/xmls/site1/site.xml22
-rw-r--r--update/org.eclipse.update.tests.core/plugin.xml27
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/AllTests.java60
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/UpdateManagerTestCase.java161
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/UpdateTestsPlugin.java125
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/api/AllAPITests.java46
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/api/DefaultFeature.java173
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/api/MyURLEntry.java31
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/api/TestDefaultExecutableFeatureAPI.java184
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/api/TestDefaultPackageFeatureAPI.java175
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/api/TestFeatureContentProvider_FileFilterAPI.java85
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/api/TestLocalSiteAPI.java117
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/api/TestNestedFeatureAPI.java153
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/api/TestPluginContainerAPI.java77
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/api/TestSiteAPI.java39
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/api/TestSiteManagerAPI.java77
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/api/TestUpdateManagerUtilsAPI.java229
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/branding/AllBrandingTests.java40
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/branding/BundleProviderTest.java50
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/branding/ProductTest.java41
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/configurations/AllConfigurationsTests.java30
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/configurations/TestBackward.java65
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/configurations/TestRevert.java126
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/core/TestErrorRecoveryLog.java32
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/core/boot/AllPlatformConfigurationTests.java38
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/core/boot/PlatformConfigurationTestCase.java78
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/core/boot/TestPlatCfgAPI.java207
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/core/boot/TestPlatCfgDefault.java33
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/implementation/SiteFTP.java272
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/implementation/SiteFTPFactory.java64
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/mirror/AllMirrorTests.java40
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/mirror/MirrorManagerTestCase.java490
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/mirror/TestRemoteDoubleEmbeddedFeatureMirror.java212
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/mirror/TestRemoteEmbeddedFeatureMirror.java189
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/mirror/TestRemoteFeatureVersionMirror.java110
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/model/AllModelTests.java40
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/model/SiteMain.java158
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/model/site.xml35
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/model/site_old_format.xml30
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/model/site_with_type.xml5
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/nativeTests/TestLocalSystemInfo.java68
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/nestedfeatures/AllNestedTests.java32
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/nestedfeatures/TestInstall.java301
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/parser/AllParserTests.java35
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/parser/TestCategories.java62
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/parser/TestFeatureParse.java132
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/parser/TestSiteParse.java288
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/perfms/AllPerformanceTests.java29
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/perfms/TestStartup.java76
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/reconciliation/AllReconciliationTests.java40
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/reconciliation/TestSiteReconciliation.java169
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/regularInstall/AllRegularInstallTests.java41
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/regularInstall/MultipleTestLocalSite.java33
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/regularInstall/TestDataEntryInstall.java100
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/regularInstall/TestExecutableInstall.java72
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/regularInstall/TestExecutablePackagedInstall.java154
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/regularInstall/TestGetFeature.java49
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/regularInstall/TestInstall.java329
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/regularInstall/TestInstallURLSIteXML.java332
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/regularInstall/TestLocalSite.java420
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/regularInstall/TestSpaceInInstall.java140
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/regularRemove/AllRegularRemoveTests.java29
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/regularRemove/TestRemove.java91
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/sitevalidation/AllSiteValidationTests.java30
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/sitevalidation/TestSiteValidation.java163
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/standalone/AllStandaloneTests.java43
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/standalone/StandaloneManagerTestCase.java323
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/standalone/TestBundlesInstall.java127
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/standalone/TestFeatureDisable.java103
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/standalone/TestFeatureEnable.java109
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/standalone/TestFeatureInstall.java134
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/standalone/TestFeatureUninstall.java123
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/standalone/TestFeatureUpdate.java138
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/types/AllTypesTests.java34
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/types/TestFeatureType.java155
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/types/TestSiteType.java84
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/uivalues/AllCoreUITests.java33
-rw-r--r--update/org.eclipse.update.tests.core/src/org/eclipse/update/tests/uivalues/TestUILabel.java87
-rw-r--r--update/org.eclipse.update.tests.core/webserver/Site with space/features space/helpFeature.jarbin0 -> 62481 bytes-rw-r--r--update/org.eclipse.update.tests.core/webserver/Site with space/features space/space feature.jarbin0 -> 61298 bytes-rw-r--r--update/org.eclipse.update.tests.core/webserver/Site with space/info/img/top_titlsm.gifbin0 -> 3083 bytes-rw-r--r--update/org.eclipse.update.tests.core/webserver/Site with space/info/img/wel_ml.jpgbin0 -> 11159 bytes-rw-r--r--update/org.eclipse.update.tests.core/webserver/Site with space/info/siteInfo.html63
-rw-r--r--update/org.eclipse.update.tests.core/webserver/Site with space/install/features space/feature3/feature.xml11
-rw-r--r--update/org.eclipse.update.tests.core/webserver/Site with space/plugins space/Pde_core.jarbin0 -> 65389 bytes-rw-r--r--update/org.eclipse.update.tests.core/webserver/Site with space/plugins space/help.jarbin0 -> 364483 bytes-rw-r--r--update/org.eclipse.update.tests.core/webserver/Site with space/plugins space/junit_3.7.jarbin0 -> 258684 bytes-rw-r--r--update/org.eclipse.update.tests.core/webserver/Site with space/site.xml20
-rw-r--r--update/org.eclipse.update.tests.core/webserver/UpdateManager/features/helpFeature.jarbin0 -> 62376 bytes-rw-r--r--update/org.eclipse.update.tests.core/webserver/UpdateManager/features/org.eclipse.pde.feature_1.0.0.jarbin0 -> 60935 bytes-rw-r--r--update/org.eclipse.update.tests.core/webserver/UpdateManager/info/img/top_titlsm.gifbin0 -> 3083 bytes-rw-r--r--update/org.eclipse.update.tests.core/webserver/UpdateManager/info/img/wel_ml.jpgbin0 -> 11159 bytes-rw-r--r--update/org.eclipse.update.tests.core/webserver/UpdateManager/info/siteInfo.html63
-rw-r--r--update/org.eclipse.update.tests.core/webserver/UpdateManager/plugins/Pde_core.jarbin0 -> 65389 bytes-rw-r--r--update/org.eclipse.update.tests.core/webserver/UpdateManager/plugins/help.jarbin0 -> 364483 bytes-rw-r--r--update/org.eclipse.update.tests.core/webserver/UpdateManager/plugins/junit_3.7.jarbin0 -> 258684 bytes-rw-r--r--update/org.eclipse.update.tests.core/webserver/UpdateManager/site.xml18
-rw-r--r--update/org.eclipse.update.tests.core/webserver/UpdateManager2/features/features2.jarbin0 -> 1430 bytes-rw-r--r--update/org.eclipse.update.tests.core/webserver/UpdateManager2/features/org.eclipse.test.feature_1.0.0.jarbin0 -> 832 bytes-rw-r--r--update/org.eclipse.update.tests.core/webserver/UpdateManager2/features/org.eclipse.update.core.tests.feature1_1.0.4.jarbin0 -> 888 bytes-rw-r--r--update/org.eclipse.update.tests.core/webserver/UpdateManager2/features/org.eclipse_test_feature.jarbin0 -> 40806 bytes-rw-r--r--update/org.eclipse.update.tests.core/webserver/UpdateManager2/nestedFeatureSiteTest/features/org.eclipse.update.core.tests.childrenfeature_2.0.0.jarbin0 -> 749 bytes-rw-r--r--update/org.eclipse.update.tests.core/webserver/UpdateManager2/nestedFeatureSiteTest/features/rootfeature.jarbin0 -> 732 bytes-rw-r--r--update/org.eclipse.update.tests.core/webserver/UpdateManager2/nestedFeatureSiteTest/plugins/org.eclipse.update.core.tests.feature1.plugin1_3.5.6.jarbin0 -> 985 bytes-rw-r--r--update/org.eclipse.update.tests.core/webserver/UpdateManager2/nestedFeatureSiteTest/plugins/org.eclipse.update.core.tests.feature1.plugin2_5.0.0.jarbin0 -> 986 bytes-rw-r--r--update/org.eclipse.update.tests.core/webserver/UpdateManager2/nestedFeatureSiteTest/plugins/org.eclipse.update.core.tests.feature1.plugin2_5.0.1.jarbin0 -> 985 bytes-rw-r--r--update/org.eclipse.update.tests.core/webserver/UpdateManager2/nestedFeatureSiteTest/site.xml4
-rw-r--r--update/org.eclipse.update.tests.core/webserver/UpdateManager2/org.eclipse.update.core.feature2_1.0.0/org.eclipse.update.core.feature2_2.2.2.jarbin0 -> 1392 bytes-rw-r--r--update/org.eclipse.update.tests.core/webserver/UpdateManager2/plugins/org.eclipse.update.core.feature1.plugin1_1.1.1.jarbin0 -> 460 bytes-rw-r--r--update/org.eclipse.update.tests.core/webserver/UpdateManager2/plugins/org.eclipse.update.core.feature2.plugin2_2.2.2.jarbin0 -> 460 bytes-rw-r--r--update/org.eclipse.update.tests.core/webserver/UpdateManager2/plugins/org.eclipse.update.core.tests.dummy_7.9.8.jarbin0 -> 180132 bytes-rw-r--r--update/org.eclipse.update.tests.core/webserver/UpdateManager2/plugins/org.eclipse.update.core.tests.feature1.plugin1_3.5.6.jarbin0 -> 47228 bytes-rw-r--r--update/org.eclipse.update.tests.core/webserver/UpdateManager2/plugins/org.eclipse.update.core.tests.feature1.plugin2_5.0.0.jarbin0 -> 47229 bytes-rw-r--r--update/org.eclipse.update.tests.core/webserver/UpdateManager2/site.xml24
-rw-r--r--update/org.eclipse.update.tests.core/webserver/bundleSite/features/com.example.bundle.feature_1.0.0.jarbin0 -> 717 bytes-rw-r--r--update/org.eclipse.update.tests.core/webserver/bundleSite/plugins/com.example.budle.fragment.ui_1.0.0.jarbin0 -> 1699 bytes-rw-r--r--update/org.eclipse.update.tests.core/webserver/bundleSite/plugins/com.example.bundle.fragment_1.0.0.jarbin0 -> 805 bytes-rw-r--r--update/org.eclipse.update.tests.core/webserver/bundleSite/plugins/com.example.bundle.plugin.ui_2.0.0.jarbin0 -> 1755 bytes-rw-r--r--update/org.eclipse.update.tests.core/webserver/bundleSite/plugins/com.example.bundle.plugin_1.0.0.jarbin0 -> 1705 bytes-rw-r--r--update/org.eclipse.update.tests.core/webserver/bundleSite/site.xml7
-rw-r--r--update/org.eclipse.update.tests.core/webserver/bundleSitesrc/com.example.budle.fragment.ui/.classpath7
-rw-r--r--update/org.eclipse.update.tests.core/webserver/bundleSitesrc/com.example.budle.fragment.ui/.project32
-rw-r--r--update/org.eclipse.update.tests.core/webserver/bundleSitesrc/com.example.budle.fragment.ui/.template4
-rw-r--r--update/org.eclipse.update.tests.core/webserver/bundleSitesrc/com.example.budle.fragment.ui/META-INF/MANIFEST.MF8
-rw-r--r--update/org.eclipse.update.tests.core/webserver/bundleSitesrc/com.example.budle.fragment.ui/fragment.xml18
-rw-r--r--update/org.eclipse.update.tests.core/webserver/bundleSitesrc/com.example.bundle.feature/.project17
-rw-r--r--update/org.eclipse.update.tests.core/webserver/bundleSitesrc/com.example.bundle.feature/feature.xml45
-rw-r--r--update/org.eclipse.update.tests.core/webserver/bundleSitesrc/com.example.bundle.fragment/.classpath7
-rw-r--r--update/org.eclipse.update.tests.core/webserver/bundleSitesrc/com.example.bundle.fragment/.project31
-rw-r--r--update/org.eclipse.update.tests.core/webserver/bundleSitesrc/com.example.bundle.fragment/.template4
-rw-r--r--update/org.eclipse.update.tests.core/webserver/bundleSitesrc/com.example.bundle.fragment/META-INF/MANIFEST.MF8
-rw-r--r--update/org.eclipse.update.tests.core/webserver/bundleSitesrc/com.example.bundle.fragment/fragment.xml17
-rw-r--r--update/org.eclipse.update.tests.core/webserver/bundleSitesrc/com.example.bundle.plugin.ui/.classpath7
-rw-r--r--update/org.eclipse.update.tests.core/webserver/bundleSitesrc/com.example.bundle.plugin.ui/.project31
-rw-r--r--update/org.eclipse.update.tests.core/webserver/bundleSitesrc/com.example.bundle.plugin.ui/.template4
-rw-r--r--update/org.eclipse.update.tests.core/webserver/bundleSitesrc/com.example.bundle.plugin.ui/META-INF/MANIFEST.MF12
-rw-r--r--update/org.eclipse.update.tests.core/webserver/bundleSitesrc/com.example.bundle.plugin.ui/bin/com/example/bundle/plugin/ui/UiPlugin.classbin0 -> 1530 bytes-rw-r--r--update/org.eclipse.update.tests.core/webserver/bundleSitesrc/com.example.bundle.plugin.ui/plugin.xml22
-rw-r--r--update/org.eclipse.update.tests.core/webserver/bundleSitesrc/com.example.bundle.plugin/.classpath7
-rw-r--r--update/org.eclipse.update.tests.core/webserver/bundleSitesrc/com.example.bundle.plugin/.project30
-rw-r--r--update/org.eclipse.update.tests.core/webserver/bundleSitesrc/com.example.bundle.plugin/.template4
-rw-r--r--update/org.eclipse.update.tests.core/webserver/bundleSitesrc/com.example.bundle.plugin/META-INF/MANIFEST.MF11
-rw-r--r--update/org.eclipse.update.tests.core/webserver/bundleSitesrc/com.example.bundle.plugin/bin/com/example/bundle/plugin/PluginPlugin.classbin0 -> 1538 bytes-rw-r--r--update/org.eclipse.update.tests.core/webserver/bundleSitesrc/com.example.bundle.plugin/plugin.xml21
-rw-r--r--update/org.eclipse.update.ui.forms/.project11
-rw-r--r--update/org.eclipse.update.ui.forms/README.TXT2
-rw-r--r--update/org.eclipse.update.ui.win32/.project11
-rw-r--r--update/org.eclipse.update.ui.win32/README.TXT2
-rw-r--r--update/org.eclipse.update.ui/.classpath7
-rw-r--r--update/org.eclipse.update.ui/.cvsignore1
-rw-r--r--update/org.eclipse.update.ui/.project26
-rw-r--r--update/org.eclipse.update.ui/.settings/org.eclipse.jdt.core.prefs69
-rw-r--r--update/org.eclipse.update.ui/Graphics_update.html955
-rw-r--r--update/org.eclipse.update.ui/about.html28
-rw-r--r--update/org.eclipse.update.ui/build.properties19
-rw-r--r--update/org.eclipse.update.ui/icons/dlcl16/collapseall.gifbin0 -> 155 bytes-rw-r--r--update/org.eclipse.update.ui/icons/dlcl16/hierarchicalLayout.gifbin0 -> 101 bytes-rw-r--r--update/org.eclipse.update.ui/icons/dlcl16/show_unconf.gifbin0 -> 376 bytes-rw-r--r--update/org.eclipse.update.ui/icons/dtool16/config_wiz.gifbin0 -> 232 bytes-rw-r--r--update/org.eclipse.update.ui/icons/dtool16/install_wiz.gifbin0 -> 348 bytes-rw-r--r--update/org.eclipse.update.ui/icons/dtool16/uninstall_wiz.gifbin0 -> 367 bytes-rw-r--r--update/org.eclipse.update.ui/icons/dtool16/update_wiz.gifbin0 -> 369 bytes-rw-r--r--update/org.eclipse.update.ui/icons/elcl16/collapseall.gifbin0 -> 157 bytes-rw-r--r--update/org.eclipse.update.ui/icons/elcl16/hierarchicalLayout.gifbin0 -> 101 bytes-rw-r--r--update/org.eclipse.update.ui/icons/elcl16/show_unconf.gifbin0 -> 591 bytes-rw-r--r--update/org.eclipse.update.ui/icons/etool16/config_wiz.gifbin0 -> 352 bytes-rw-r--r--update/org.eclipse.update.ui/icons/etool16/install_wiz.gifbin0 -> 377 bytes-rw-r--r--update/org.eclipse.update.ui/icons/etool16/uninstall_wiz.gifbin0 -> 604 bytes-rw-r--r--update/org.eclipse.update.ui/icons/etool16/update_wiz.gifbin0 -> 600 bytes-rw-r--r--update/org.eclipse.update.ui/icons/eview16/configs.gifbin0 -> 368 bytes-rw-r--r--update/org.eclipse.update.ui/icons/eview16/preview.gifbin0 -> 648 bytes-rw-r--r--update/org.eclipse.update.ui/icons/forms/def_provider.jpgbin0 -> 25721 bytes-rw-r--r--update/org.eclipse.update.ui/icons/forms/form_banner.gifbin0 -> 5600 bytes-rw-r--r--update/org.eclipse.update.ui/icons/forms/form_banner.jpgbin0 -> 4985 bytes-rw-r--r--update/org.eclipse.update.ui/icons/forms/form_underline.jpgbin0 -> 3989 bytes-rw-r--r--update/org.eclipse.update.ui/icons/forms/topic.gifbin0 -> 162 bytes-rw-r--r--update/org.eclipse.update.ui/icons/obj16/app_obj.gifbin0 -> 591 bytes-rw-r--r--update/org.eclipse.update.ui/icons/obj16/bfolder_obj.gifbin0 -> 377 bytes-rw-r--r--update/org.eclipse.update.ui/icons/obj16/category_obj.gifbin0 -> 572 bytes-rw-r--r--update/org.eclipse.update.ui/icons/obj16/config_obj.gifbin0 -> 368 bytes-rw-r--r--update/org.eclipse.update.ui/icons/obj16/efix2_obj.gifbin0 -> 597 bytes-rw-r--r--update/org.eclipse.update.ui/icons/obj16/efix_obj.gifbin0 -> 609 bytes-rw-r--r--update/org.eclipse.update.ui/icons/obj16/error_st_obj.gifbin0 -> 339 bytes-rw-r--r--update/org.eclipse.update.ui/icons/obj16/esite_obj.gifbin0 -> 319 bytes-rw-r--r--update/org.eclipse.update.ui/icons/obj16/feature_obj.gifbin0 -> 585 bytes-rw-r--r--update/org.eclipse.update.ui/icons/obj16/history_obj.gifbin0 -> 578 bytes-rw-r--r--update/org.eclipse.update.ui/icons/obj16/lsite_obj.gifbin0 -> 348 bytes-rw-r--r--update/org.eclipse.update.ui/icons/obj16/notinstalled_feature_obj.gifbin0 -> 237 bytes-rw-r--r--update/org.eclipse.update.ui/icons/obj16/ok_st_obj.gifbin0 -> 343 bytes-rw-r--r--update/org.eclipse.update.ui/icons/obj16/psite_obj.gifbin0 -> 333 bytes-rw-r--r--update/org.eclipse.update.ui/icons/obj16/site_obj.gifbin0 -> 353 bytes-rw-r--r--update/org.eclipse.update.ui/icons/obj16/unconf_feature_obj.gifbin0 -> 596 bytes-rw-r--r--update/org.eclipse.update.ui/icons/obj16/updates_obj.gifbin0 -> 332 bytes-rw-r--r--update/org.eclipse.update.ui/icons/obj16/usearch_obj.gifbin0 -> 586 bytes-rw-r--r--update/org.eclipse.update.ui/icons/obj16/web_bkmrk_obj.gifbin0 -> 578 bytes-rw-r--r--update/org.eclipse.update.ui/icons/ovr16/add_stat.gifbin0 -> 186 bytes-rw-r--r--update/org.eclipse.update.ui/icons/ovr16/current_co.gifbin0 -> 79 bytes-rw-r--r--update/org.eclipse.update.ui/icons/ovr16/del_stat.gifbin0 -> 184 bytes-rw-r--r--update/org.eclipse.update.ui/icons/ovr16/error_co.gifbin0 -> 82 bytes-rw-r--r--update/org.eclipse.update.ui/icons/ovr16/installable_co.gifbin0 -> 169 bytes-rw-r--r--update/org.eclipse.update.ui/icons/ovr16/linked_co.gifbin0 -> 85 bytes-rw-r--r--update/org.eclipse.update.ui/icons/ovr16/mod_co.gifbin0 -> 187 bytes-rw-r--r--update/org.eclipse.update.ui/icons/ovr16/unconfigured_co.gifbin0 -> 112 bytes-rw-r--r--update/org.eclipse.update.ui/icons/ovr16/updated_co.gifbin0 -> 105 bytes-rw-r--r--update/org.eclipse.update.ui/icons/ovr16/warning_co.gifbin0 -> 173 bytes-rw-r--r--update/org.eclipse.update.ui/icons/wizban/config_wiz.gifbin0 -> 3388 bytes-rw-r--r--update/org.eclipse.update.ui/icons/wizban/def_wizban.jpgbin0 -> 33456 bytes-rw-r--r--update/org.eclipse.update.ui/icons/wizban/install_wiz.gifbin0 -> 3550 bytes-rw-r--r--update/org.eclipse.update.ui/icons/wizban/uninstall_wiz.gifbin0 -> 3719 bytes-rw-r--r--update/org.eclipse.update.ui/icons/wizban/update_wiz.gifbin0 -> 3744 bytes-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/ConfigurationManagerWindow.java297
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/RestartDialog.java88
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/URLCoder.java59
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/UpdateLabelProvider.java49
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/UpdateUI.java273
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/UpdateUIImages.java105
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/UpdateUIMessages.java357
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/UpdateUIPluginResources.properties409
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/BookmarkFolder.java59
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/BookmarkUtil.java280
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/ConfiguredFeatureAdapter.java116
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/ConfiguredSiteAdapter.java51
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/DiscoveryFolder.java150
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/FeatureAdapter.java58
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/FeatureReferenceAdapter.java105
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/IConfiguredFeatureAdapter.java21
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/IConfiguredSiteAdapter.java19
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/IConfiguredSiteContext.java22
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/IFeatureAdapter.java31
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/ISiteAdapter.java25
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/MissingFeature.java456
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/NamedModelObject.java96
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/SimpleFeatureAdapter.java67
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/SiteBookmark.java299
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/SiteCategory.java203
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/UIModelObject.java57
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/model/UpdateModel.java122
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/parts/AbstractOverlayIcon.java115
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/parts/DefaultContentProvider.java22
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/parts/ImageOverlayIcon.java34
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/parts/OverlayIcon.java117
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/parts/PixelConverter.java45
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/parts/SWTUtil.java101
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/parts/SharedLabelProvider.java203
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/preferences/MainPreferencePage.java290
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/preferences/UpdateSettingsPreferencePage.java116
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/properties/ConfiguredSitePropertyPage.java63
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/properties/FeatureCopyrightPropertyPage.java92
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/properties/FeatureGeneralPropertyPage.java175
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/properties/FeatureLicensePropertyPage.java79
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/properties/FeatureStatusPropertyPage.java160
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/properties/InstallConfigurationPropertyPage.java51
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/security/Authentication.java36
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/security/JarVerificationDialog.java145
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/security/JarVerificationPage.java333
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/security/JarVerificationService.java146
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/security/UserValidationDialog.java159
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/ConfigurationPreview.java196
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/ConfigurationView.java1387
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/FeatureAction.java37
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/FeatureStateAction.java99
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/FeaturesStateAction.java163
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/FindAndInstallHandler.java32
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/FindUpdatesAction.java151
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/IPreviewTask.java22
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/InstallOptionalFeatureAction.java93
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/InstallationHistoryAction.java274
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/ManageConfigurationHandler.java32
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/NewExtensionLocationAction.java111
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/ReplaceVersionAction.java60
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/RevertConfigurationAction.java43
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/ShowActivitiesAction.java32
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/SiteStateAction.java77
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/UnconfigureAndUninstallFeatureAction.java97
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/UnconfigureAndUninstallFeaturesAction.java109
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/UninstallFeatureAction.java99
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/views/UninstallFeaturesAction.java108
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/ActivitiesTableViewer.java145
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/BannerPage.java76
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/ContainerCheckedTreeViewer.java187
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/DuplicateConflictsDialog.java123
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/EditSiteDialog.java69
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/FeatureSorter.java88
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/IDynamicPage.java22
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/ISearchProvider.java20
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/InstallWizard.java155
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/InstallWizard2.java552
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/InstallWizardOperation.java105
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/LicensePage.java213
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/LocalSiteSelector.java264
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/MirrorsDialog.java156
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/ModeSelectionPage.java150
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/NewUpdateSiteDialog.java216
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/OptionalFeaturesPage.java331
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/ReplaceFeatureVersionWizard.java36
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/ReplaceFeatureVersionWizardPage.java180
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/ResizableInstallWizardDialog.java61
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/RevertConfigurationWizard.java38
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/RevertConfigurationWizardPage.java263
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/ReviewPage.java1662
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/ShowActivitiesDialog.java207
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/SitePage.java557
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/SitesImportExport.java88
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/TableLayoutComposite.java188
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/TargetPage.java833
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/TargetSiteDialog.java376
-rw-r--r--update/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/UIProblemHandler.java29
-rw-r--r--update/org.eclipse.update.ui/src_webapp/org/eclipse/update/internal/ui/servlets/InstallServlet.java210
-rw-r--r--update/org.eclipse.update.ui/src_webapp/org/eclipse/update/internal/ui/servlets/ServletsUtil.java151
-rw-r--r--update/org.eclipse.update.ui/webapp/WEB-INF/.cvsignore1
-rw-r--r--update/org.eclipse.update.ui/webapp/WEB-INF/lib/.cvsignore1
-rw-r--r--update/org.eclipse.update.ui/webapp/WEB-INF/web.xml20
-rw-r--r--update/org.eclipse.update.ui/webapp/images/backward_nav.gifbin0 -> 104 bytes-rw-r--r--update/org.eclipse.update.ui/webapp/images/form_banner.jpgbin0 -> 4985 bytes-rw-r--r--update/org.eclipse.update.ui/webapp/images/form_underline.jpgbin0 -> 3989 bytes-rw-r--r--update/org.eclipse.update/.project11
-rw-r--r--update/org.eclipse.update/README.TXT2
1409 files changed, 134819 insertions, 0 deletions
diff --git a/ant/org.eclipse.ant.core/.classpath b/ant/org.eclipse.ant.core/.classpath
new file mode 100644
index 000000000..dc92c623b
--- /dev/null
+++ b/ant/org.eclipse.ant.core/.classpath
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry output="src_ant_bin" kind="src" path="src_ant/"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/ant/org.eclipse.ant.core/.externalToolBuilders/Build Ant Support JAR.launch b/ant/org.eclipse.ant.core/.externalToolBuilders/Build Ant Support JAR.launch
new file mode 100644
index 000000000..0f5d31333
--- /dev/null
+++ b/ant/org.eclipse.ant.core/.externalToolBuilders/Build Ant Support JAR.launch
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
+<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
+<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
+<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="true"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,auto,clean"/>
+<booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/>
+<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
+<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
+<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
+<stringAttribute key="org.eclipse.debug.ui.target_run_perspective" value="perspective_none"/>
+<stringAttribute key="org.eclipse.ant.ui.ATTR_ANT_CLEAN_TARGETS" value="clean,"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_BUILD_SCOPE" value="${working_set:&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;launchConfigurationWorkingSet factoryID=&quot;org.eclipse.ui.internal.WorkingSetFactory&quot; name=&quot;workingSet&quot; editPageId=&quot;org.eclipse.ui.resourceWorkingSetPage&quot;&gt;&#10;&lt;item factoryID=&quot;org.eclipse.ui.internal.model.ResourceFactory&quot; path=&quot;/org.eclipse.ant.core/src_ant&quot; type=&quot;2&quot;/&gt;&#10;&lt;item factoryID=&quot;org.eclipse.ui.internal.model.ResourceFactory&quot; path=&quot;/org.eclipse.ant.core/buildfiles/buildExtraJAR.xml&quot; type=&quot;1&quot;/&gt;&#10;&lt;/launchConfigurationWorkingSet&gt;&#10;}"/>
+<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${working_set:&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;launchConfigurationWorkingSet factoryID=&quot;org.eclipse.ui.internal.WorkingSetFactory&quot; name=&quot;workingSet&quot; editPageId=&quot;org.eclipse.ui.resourceWorkingSetPage&quot;&gt;&#10;&lt;item factoryID=&quot;org.eclipse.ui.internal.model.ResourceFactory&quot; path=&quot;/org.eclipse.ant.core&quot; type=&quot;4&quot;/&gt;&#10;&lt;/launchConfigurationWorkingSet&gt;&#10;}"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/org.eclipse.ant.core/buildfiles/buildExtraJAR.xml}"/>
+<booleanAttribute key="org.eclipse.debug.ui.ATTR_RUN_IN_BACKGROUND" value="false"/>
+</launchConfiguration>
diff --git a/ant/org.eclipse.ant.core/.project b/ant/org.eclipse.ant.core/.project
new file mode 100644
index 000000000..f37d1c56c
--- /dev/null
+++ b/ant/org.eclipse.ant.core/.project
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.ant.core</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
+ <arguments>
+ <dictionary>
+ <key>LaunchConfigHandle</key>
+ <value>&lt;project&gt;/.externalToolBuilders/Build Ant Support JAR.launch</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ </natures>
+</projectDescription>
diff --git a/ant/org.eclipse.ant.core/.settings/org.eclipse.pde.core.prefs b/ant/org.eclipse.ant.core/.settings/org.eclipse.pde.core.prefs
new file mode 100644
index 000000000..a490ecf70
--- /dev/null
+++ b/ant/org.eclipse.ant.core/.settings/org.eclipse.pde.core.prefs
@@ -0,0 +1,3 @@
+#Thu May 27 14:47:50 PDT 2004
+eclipse.preferences.version=1
+selfhosting.binExcludes=/org.eclipse.ant.core/src_ant_bin
diff --git a/ant/org.eclipse.ant.core/about.html b/ant/org.eclipse.ant.core/about.html
new file mode 100644
index 000000000..b3c0a26b7
--- /dev/null
+++ b/ant/org.eclipse.ant.core/about.html
@@ -0,0 +1,54 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>October 8, 2009</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
+
+<h3>Third Party Content</h3>
+
+<p>The Content includes items that have been sourced from third parties as set out below. If you
+did not receive this Content directly from the Eclipse Foundation, the following is provided
+for informational purposes only, and you should look to the Redistributor&rsquo;s license for
+terms and conditions of use.</p>
+
+<h4>Ant 1.7.1</h4>
+
+<p>The following classes in the plug-in JAR are based on Ant code developed by The Apache Software Foundation and shall be defined as the &quot;Ant-Derived Work&quot;:</p>
+
+<ul>
+ <li>org.eclipse.ant.internal.core.ant.InternalAntRunner</li>
+ <li>org.eclipse.ant.internal.core.ant.InternalProject</li>
+</ul>
+
+<p>The binary code for the Ant-Derived Work is located in lib/antsupportlib.jar and the source code is located in lib/antsupportlibsrc.zip.</p>
+
+<p>Your use of the Ant-Derived Work is subject to the terms and conditions of the Apache Software License 2.0. A copy of the license is contained
+in the file <a href="about_files/asl-v20.txt" target="_blank">about_files/asl-v20.txt</a> and is also available at <a href="http://www.apache.org/licenses/LICENSE-2.0.html" target="_blank">http://www.apache.org/licenses/LICENSE-2.0.html</a>.
+
+<p>The names &quot;Ant&quot; and &quot;Apache Software Foundation&quot; must not be used to endorse or promote products derived from this
+software without prior written permission. For written permission, please contact <a href="mailto:apache@apache.org">apache@apache.org</a>.</p>
+
+<p>The Apache attribution <a href="about_files/NOTICE" target="_blank">NOTICE</a> file is included with the Content in accordance with 4d of the Apache License, Version 2.0.</p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/ant/org.eclipse.ant.core/about_files/NOTICE b/ant/org.eclipse.ant.core/about_files/NOTICE
new file mode 100644
index 000000000..1fb6dde47
--- /dev/null
+++ b/ant/org.eclipse.ant.core/about_files/NOTICE
@@ -0,0 +1,15 @@
+ =========================================================================
+ == NOTICE file corresponding to the section 4 d of ==
+ == the Apache License, Version 2.0, ==
+ == in this case for the Apache Ant distribution. ==
+ =========================================================================
+
+ This product includes software developed by
+ The Apache Software Foundation (http://www.apache.org/).
+
+ This product includes also software developed by :
+ - the W3C consortium (http://www.w3c.org) ,
+ - the SAX project (http://www.saxproject.org)
+
+ Please read the different LICENSE files present in the root directory of
+ this distribution.
diff --git a/ant/org.eclipse.ant.core/about_files/asl-v20.txt b/ant/org.eclipse.ant.core/about_files/asl-v20.txt
new file mode 100644
index 000000000..d64569567
--- /dev/null
+++ b/ant/org.eclipse.ant.core/about_files/asl-v20.txt
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/ant/org.eclipse.ant.core/build.properties b/ant/org.eclipse.ant.core/build.properties
new file mode 100644
index 000000000..faf3b08ea
--- /dev/null
+++ b/ant/org.eclipse.ant.core/build.properties
@@ -0,0 +1,25 @@
+###############################################################################
+# Copyright (c) 2000, 2007 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
+###############################################################################
+source.. =src/
+source.lib/antsupportlib.jar=src_ant/
+src.includes = about.html,\
+ schema/,\
+ about_files/
+bin.includes = plugin.xml,\
+ plugin.properties,\
+ about.html,\
+ .,\
+ lib/*.jar,\
+ META-INF/,\
+ about_files/
+jars.compile.order=.,lib/antsupportlib.jar
+jars.extra.classpath=platform:/plugin/org.apache.ant/lib/ant.jar,platform:/plugin/org.apache.ant/lib/ant-launcher.jar
+javadoc.packages=org.eclipse.* \ No newline at end of file
diff --git a/ant/org.eclipse.ant.core/buildfiles/exportplugin.xml b/ant/org.eclipse.ant.core/buildfiles/exportplugin.xml
new file mode 100644
index 000000000..f0df5c37d
--- /dev/null
+++ b/ant/org.eclipse.ant.core/buildfiles/exportplugin.xml
@@ -0,0 +1,37 @@
+<!-- Export a jar of .class files for the org.eclipse.ant.core Eclipse plug-in
+ along with other important plugin files to the "plugin-export" subdirectory
+ of the target Eclipse installation -->
+<project name="Export ant.core" default="export" basedir="..">
+
+ <!-- Set the timestamp and important properties -->
+ <target name="init">
+ <tstamp/>
+ <property name="destdir" value="../../plugin-export" />
+ <property name="dest" value="${destdir}/org.eclipse.ant.core_3.0.0" />
+ </target>
+
+ <!-- Create the jar of .class files, and copy other important files to export dir -->
+ <target name="export" depends="init">
+ <mkdir dir="${destdir}" />
+ <delete dir="${dest}" />
+ <mkdir dir="${dest}" />
+ <delete dir="${dest}/lib"/>
+ <mkdir dir="${dest}/lib"/>
+ <jar destfile="${dest}/antsupport.jar">
+ <fileset dir="bin">
+ <exclude name="org/eclipse/ant/internal/core/ant/*"/>
+ </fileset>
+ </jar>
+ <!-- Create the source zip -->
+ <zip destfile="${dest}/antsupportsrc.zip">
+ <fileset dir="src"/>
+ </zip>
+ <copy file="plugin.xml" todir="${dest}"/>
+ <copy file="plugin.properties" todir="${dest}"/>
+ <copy file=".classpath" todir="${dest}"/>
+ <copy file=".options" todir="${dest}"/>
+ <ant antfile="buildfiles/buildExtraJAR.xml" target="build"/>
+ <copy file="lib/antsupportlib.jar" todir="${dest}/lib"/>
+ </target>
+
+</project>
diff --git a/ant/org.eclipse.ant.core/plugin.properties b/ant/org.eclipse.ant.core/plugin.properties
new file mode 100644
index 000000000..1d3d526ac
--- /dev/null
+++ b/ant/org.eclipse.ant.core/plugin.properties
@@ -0,0 +1,19 @@
+###############################################################################
+# Copyright (c) 2000, 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:
+# IBM Corporation - initial API and implementation
+###############################################################################
+
+pluginName = Ant Build Tool Core
+providerName = Eclipse.org
+classpathName = Extra Ant Classpath Entry Definitions
+tasksName = Ant Task Definitions
+typesName = Ant Type Definitions
+propertiesName = Ant Properties Definitions
+
+antBuildFileContentType.name= Ant Buildfile
diff --git a/ant/org.eclipse.ant.core/schema/antProperties.exsd b/ant/org.eclipse.ant.core/schema/antProperties.exsd
new file mode 100644
index 000000000..50a812d46
--- /dev/null
+++ b/ant/org.eclipse.ant.core/schema/antProperties.exsd
@@ -0,0 +1,149 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.ant.core">
+<annotation>
+ <appInfo>
+ <meta.schema plugin="org.eclipse.ant.core" id="antProperties" name="Ant Properties"/>
+ </appInfo>
+ <documentation>
+ Allows plug-ins to define Ant properties for use in Ant build files.
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <complexType>
+ <sequence>
+ <element ref="antProperty" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+ a fully qualified identifier of the target extension point
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+ an optional identifier of the extension instance
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+ an optional name of the extension instance
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="antProperty">
+ <annotation>
+ <appInfo>
+ <meta.element labelAttribute="name"/>
+ </appInfo>
+ </annotation>
+ <complexType>
+ <attribute name="name" type="string" use="required">
+ <annotation>
+ <documentation>
+ The name of the property.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="value" type="string">
+ <annotation>
+ <documentation>
+ The value of the property. If a value is provided here, the &quot;class&quot; attribute is ignored.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="class" type="string">
+ <annotation>
+ <documentation>
+ If there is no &apos;value&apos; attribute provided, this class is called to return the dynamic value for the Ant property. If &lt;code&gt;null&lt;/code&gt; is returned, the value is not set.
+ </documentation>
+ <appInfo>
+ <meta.attribute kind="java" basedOn="org.eclipse.ant.core.IAntPropertyValueProvider"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ <attribute name="headless" type="boolean">
+ <annotation>
+ <documentation>
+ indicates whether this property is suitable for use in a &quot;headless&quot; Ant environment. If running headless and the attribute is &quot;false&quot;, the property will not be set and any specified &lt;code&gt;org.eclipse.ant.core.IAntPropertyValueProvider&lt;/code&gt; will not be instantiated. The implied value is &lt;code&gt;true&lt;/code&gt;, when not specified.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="eclipseRuntime" type="boolean">
+ <annotation>
+ <documentation>
+ indicates whether this property should only be considered when run in the same VM as Eclipse. The implied value is &lt;code&gt;true&lt;/code&gt;, when not specified.
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="since"/>
+ </appInfo>
+ <documentation>
+ 3.0
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="examples"/>
+ </appInfo>
+ <documentation>
+ The following is an example of an Ant properties extension point:
+&lt;p&gt;
+&lt;pre&gt;
+ &lt;extension point=&quot;org.eclipse.ant.core.antProperties&quot;&gt;
+ &lt;antProperty name=&quot;eclipse.home&quot;
+ class=&quot;org.eclipse.ant.internal.core.AntPropertyValueProvider&quot;/&gt;
+ &lt;antProperty name=&quot;eclipse.running&quot;
+ value=&quot;true&quot;/&gt;
+ &lt;/extension&gt;
+&lt;/pre&gt;
+&lt;/p&gt;
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="apiInfo"/>
+ </appInfo>
+ <documentation>
+ The class named in the &lt;samp&gt;class&lt;/samp&gt; property must implement the &lt;samp&gt;org.eclipse.ant.core.IAntPropertyValueProvider&lt;/samp&gt; interface.
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="implementation"/>
+ </appInfo>
+ <documentation>
+ The platform uses this mechanism to set the Ant property eclipse.home to the Eclipse installation directory and to set the eclipse.running property.
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="copyright"/>
+ </appInfo>
+ <documentation>
+ Copyright (c) 2000, 2006 IBM Corporation and others.&lt;br&gt;
+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
+&lt;a href=&quot;http://www.eclipse.org/legal/epl-v10.html&quot;&gt;http://www.eclipse.org/legal/epl-v10.html&lt;/a&gt;
+ </documentation>
+ </annotation>
+
+</schema>
diff --git a/ant/org.eclipse.ant.core/schema/antTypes.exsd b/ant/org.eclipse.ant.core/schema/antTypes.exsd
new file mode 100644
index 000000000..9c6d31d0b
--- /dev/null
+++ b/ant/org.eclipse.ant.core/schema/antTypes.exsd
@@ -0,0 +1,141 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.ant.core">
+<annotation>
+ <appInfo>
+ <meta.schema plugin="org.eclipse.ant.core" id="antTypes" name="Ant Types"/>
+ </appInfo>
+ <documentation>
+ Allows plug-ins to define arbitrary Ant datatypes for
+use by the Ant infrastructure. The standard Ant
+infrastructure allows for the addition of arbitrary
+datatypes. Unfortunately, it is unlikely that the
+Ant Core plug-in would have the classes required
+by these datatypes on its classpath (or that of any
+of its prerequisites). To address this, clients
+should define an extension which plugs into this
+extension-point and maps a datatype name onto a class.
+The Ant plug-in can then request that the declaring
+plug-in load the specified class.
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <complexType>
+ <sequence>
+ <element ref="antType" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+ a fully qualified identifier of the target extension point
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+ an optional identifier of the extension instance
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+ an optional name of the extension instance
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="antType">
+ <annotation>
+ <appInfo>
+ <meta.element labelAttribute="name"/>
+ </appInfo>
+ </annotation>
+ <complexType>
+ <attribute name="name" type="string" use="required">
+ <annotation>
+ <documentation>
+ name of the type to be defined
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="uri" type="string">
+ <annotation>
+ <documentation>
+ The uri that this definition should live in. Only used if using Ant newer than 1.6.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="class" type="string" use="required">
+ <annotation>
+ <documentation>
+ the fully qualified name of a Java class implementing
+the datatype. Generally this class must be a subclass of
+&lt;code&gt;org.apache.tools.ant.types.DataType&lt;/code&gt;.
+ </documentation>
+ <appInfo>
+ <meta.attribute kind="java" basedOn="org.apache.tools.ant.types.DataType"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ <attribute name="library" type="string" use="required">
+ <annotation>
+ <documentation>
+ a path relative to the plug-in install location for the library containing the type.
+ </documentation>
+ <appInfo>
+ <meta.attribute kind="resource"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ <attribute name="headless" type="boolean">
+ <annotation>
+ <documentation>
+ indicates whether this type is suitable for use in a &quot;headless&quot; Ant environment. If running headless and the attribute is &lt;code&gt;false&lt;/code&gt;, the type will not be loaded or defined. As well, the plugin class loader will not be added as a parent classloader to the Ant classloader. The implied value is &lt;code&gt;true&lt;/code&gt;, when not specified.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="eclipseRuntime" type="boolean">
+ <annotation>
+ <documentation>
+ indicates whether this type requires an Eclipse runtime (i.e. must be run in the same VM as Eclipse). The implied value is &lt;code&gt;true&lt;/code&gt;, when not specified.
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="examples"/>
+ </appInfo>
+ <documentation>
+ The following is an example of an Ant types extension point:
+&lt;p&gt;
+&lt;pre&gt;
+ &lt;extension point=&quot;org.eclipse.ant.core.antTypes&quot;&gt;
+ &lt;antType name=&quot;coolType&quot; class=&quot;com.example.CoolType&quot; library=&quot;lib/antSupport.jar&quot;/&gt;
+ &lt;/extension&gt;
+&lt;/pre&gt;
+&lt;/p&gt;
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="copyright"/>
+ </appInfo>
+ <documentation>
+ Copyright (c) 2000, 2006 IBM Corporation and others.&lt;br&gt;
+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
+&lt;a href=&quot;http://www.eclipse.org/legal/epl-v10.html&quot;&gt;http://www.eclipse.org/legal/epl-v10.html&lt;/a&gt;
+ </documentation>
+ </annotation>
+
+</schema>
diff --git a/ant/org.eclipse.ant.core/schema/extraClasspathEntries.exsd b/ant/org.eclipse.ant.core/schema/extraClasspathEntries.exsd
new file mode 100644
index 000000000..755797716
--- /dev/null
+++ b/ant/org.eclipse.ant.core/schema/extraClasspathEntries.exsd
@@ -0,0 +1,113 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.ant.core">
+<annotation>
+ <appInfo>
+ <meta.schema plugin="org.eclipse.ant.core" id="extraClasspathEntries" name="Extra Ant Classpath Entries"/>
+ </appInfo>
+ <documentation>
+ Allows plug-ins to define arbitrary JARs for use by the Ant infrastructure.
+These JARs are put into the Ant classpath at runtime. Besides
+the JAR, the plug-in classloader of the plug-in providing the
+JAR is also added to the classpath.
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <complexType>
+ <sequence>
+ <element ref="extraClasspathEntry" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+ a fully qualified identifier of the target extension point
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+ an optional identifier of the extension instance
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+ an optional name of the extension instance
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="extraClasspathEntry">
+ <complexType>
+ <attribute name="library" type="string" use="required">
+ <annotation>
+ <documentation>
+ a path relative to the plug-in install location for the library.
+ </documentation>
+ <appInfo>
+ <meta.attribute kind="resource"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ <attribute name="headless" type="boolean">
+ <annotation>
+ <documentation>
+ indicates whether this extra classpath entry is suitable for use in a &quot;headless&quot; Ant environment. If running headless and the attribute is &lt;code&gt;false&lt;/code&gt;, this entry will not be added to the Ant classpath. As well, the plugin class loader will not be added as a parent classloader to the Ant classloader. The implied value is &lt;code&gt;true&lt;/code&gt;, when not specified.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="eclipseRuntime" type="boolean">
+ <annotation>
+ <documentation>
+ indicates whether this extra classpath entry should only be considered for builds run in the same VM as Eclipse. The implied value is true, when not specified.
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="examples"/>
+ </appInfo>
+ <documentation>
+ The following is an example of an extra classpath entries extension point:
+
+&lt;p&gt;
+&lt;pre&gt;
+ &lt;extension point=&quot;org.eclipse.ant.core.extraClasspathEntries&quot;&gt;
+ &lt;extraClasspathEntry library=&quot;myExtraLibrary.jar&quot;/&gt;
+ &lt;/extension&gt;
+&lt;/pre&gt;
+&lt;/p&gt;
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="implementation"/>
+ </appInfo>
+ <documentation>
+ The platform itself supplies an Ant support jar (antsupportlib.jar).
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="copyright"/>
+ </appInfo>
+ <documentation>
+ Copyright (c) 2000, 2005 IBM Corporation and others.&lt;br&gt;
+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
+&lt;a href=&quot;http://www.eclipse.org/legal/epl-v10.html&quot;&gt;http://www.eclipse.org/legal/epl-v10.html&lt;/a&gt;
+ </documentation>
+ </annotation>
+
+</schema>
diff --git a/ant/org.eclipse.ant.core/src/org/eclipse/ant/core/AntCorePlugin.java b/ant/org.eclipse.ant.core/src/org/eclipse/ant/core/AntCorePlugin.java
new file mode 100644
index 000000000..7f26376b0
--- /dev/null
+++ b/ant/org.eclipse.ant.core/src/org/eclipse/ant/core/AntCorePlugin.java
@@ -0,0 +1,308 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 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:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.core;
+
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.Arrays;
+import java.util.List;
+
+import org.eclipse.ant.internal.core.AntClassLoader;
+import org.eclipse.ant.internal.core.AntCoreUtil;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtensionPoint;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Plugin;
+import org.eclipse.core.runtime.Status;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The plug-in runtime class for the Ant Core plug-in.
+ * Clients may not instantiate or subclass this class.
+ * @noinstantiate This class is not intended to be instantiated by clients.
+ * @noextend This class is not intended to be subclassed by clients.
+ */
+public class AntCorePlugin extends Plugin {
+
+ /**
+ * Status code indicating an unexpected internal error.
+ * @since 2.1
+ */
+ public static final int INTERNAL_ERROR = 120;
+
+ /**
+ * The single instance of this plug-in runtime class.
+ */
+ private static AntCorePlugin plugin;
+
+ /**
+ * The preferences class for this plug-in.
+ */
+ private AntCorePreferences preferences;
+
+ /**
+ * Unique identifier constant (value <code>"org.eclipse.ant.core"</code>)
+ * for the Ant Core plug-in.
+ */
+ public static final String PI_ANTCORE = "org.eclipse.ant.core"; //$NON-NLS-1$
+
+ /**
+ * Simple identifier constant (value <code>"antTasks"</code>)
+ * for the Ant tasks extension point.
+ */
+ public static final String PT_TASKS = "antTasks"; //$NON-NLS-1$
+
+ /**
+ * Simple identifier constant (value <code>"extraClasspathEntries"</code>)
+ * for the extra classpath entries extension point.
+ */
+ public static final String PT_EXTRA_CLASSPATH = "extraClasspathEntries"; //$NON-NLS-1$
+
+ /**
+ * Simple identifier constant (value <code>"antTypes"</code>)
+ * for the Ant types extension point.
+ */
+ public static final String PT_TYPES = "antTypes"; //$NON-NLS-1$
+
+ /**
+ * Simple identifier constant (value <code>"antProperties"</code>)
+ * for the Ant properties extension point.
+ *
+ * @since 3.0
+ */
+ public static final String PT_PROPERTIES = "antProperties"; //$NON-NLS-1$
+
+ /**
+ * Simple identifier constant (value <code>"org.eclipse.ant.core.antBuildFile"</code>)
+ * for the content type of an Ant BuildFile
+ *
+ * @since 3.0
+ */
+ public static final String ANT_BUILDFILE_CONTENT_TYPE = PI_ANTCORE + ".antBuildFile"; //$NON-NLS-1$
+
+ /**
+ * Simple identifier constant (value <code>"class"</code>)
+ * of a tag that appears in Ant extensions.
+ */
+ public static final String CLASS = "class"; //$NON-NLS-1$
+
+ /**
+ * Simple identifier constant (value <code>"name"</code>)
+ * of a tag that appears in Ant extensions.
+ */
+ public static final String NAME = "name"; //$NON-NLS-1$
+
+ /**
+ * Simple identifier constant (value <code>"library"</code>)
+ * of a tag that appears in Ant extensions.
+ */
+ public static final String LIBRARY = "library"; //$NON-NLS-1$
+
+ /**
+ * Simple identifier constant (value <code>"headless"</code>) of a tag
+ * that appears in Ant extensions.
+ * @since 2.1
+ */
+ public static final String HEADLESS = "headless"; //$NON-NLS-1$
+
+ /**
+ * Simple identifier constant (value <code>"eclipseRuntime"</code>) of a tag
+ * that appears in Ant extensions.
+ * @since 3.0
+ */
+ public static final String ECLIPSE_RUNTIME = "eclipseRuntime"; //$NON-NLS-1$
+
+ /**
+ * Simple identifier constant (value <code>"uri"</code>) of a tag
+ * that appears in Ant extensions.
+ * @since 3.2
+ */
+ public static final String URI = "uri"; //$NON-NLS-1$
+
+ /**
+ * Simple identifier constant (value <code>"value"</code>) of a tag
+ * that appears in Ant extensions.
+ * @since 3.0
+ */
+ public static final String VALUE = "value"; //$NON-NLS-1$
+
+ /**
+ * Key to access the <code>IProgressMonitor</code> reference. When a
+ * progress monitor is passed to the <code>AntRunner.run(IProgressMonitor)</code>
+ * method, the object is available as a reference for the current
+ * Ant project.
+ */
+ public static final String ECLIPSE_PROGRESS_MONITOR = "eclipse.progress.monitor"; //$NON-NLS-1$
+
+ /**
+ * Status code indicating an error occurred running a build.
+ * @since 2.1
+ */
+ public static final int ERROR_RUNNING_BUILD = 1;
+
+ /**
+ * Status code indicating an error occurred due to a malformed URL.
+ * @since 2.1
+ */
+ public static final int ERROR_MALFORMED_URL = 2;
+
+ /**
+ * Status code indicating an error occurred as a library was not specified
+ * @since 2.1
+ */
+ public static final int ERROR_LIBRARY_NOT_SPECIFIED = 3;
+
+ /**
+ * Constructs an instance of this plug-in runtime class.
+ * <p>
+ * An instance of this plug-in runtime class is automatically created
+ * when the facilities provided by the Ant Core plug-in are required.
+ * <b>Clients must never explicitly instantiate a plug-in runtime class.</b>
+ * </p>
+ * @since 3.1
+ *
+ */
+ public AntCorePlugin() {
+ plugin = this;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
+ * @since 3.1
+ */
+ public void stop(BundleContext context) throws Exception {
+ super.stop(context);
+ AntCoreUtil.setBundleContext(null);
+ if (preferences != null) {
+ savePluginPreferences();
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
+ * @since 3.1
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ AntCoreUtil.setBundleContext(context);
+ }
+
+ /**
+ * Given an extension point name, extract its extensions and return them
+ * as a List.
+ * @param pointName The name of the extension point
+ * @return The list of the extensions
+ */
+ private List extractExtensions(String pointName) {
+ IExtensionPoint extensionPoint= Platform.getExtensionRegistry().getExtensionPoint(AntCorePlugin.PI_ANTCORE, pointName);
+ if (extensionPoint == null) {
+ return null;
+ }
+ IConfigurationElement[] extensions = extensionPoint.getConfigurationElements();
+ return Arrays.asList(extensions);
+ }
+
+ /**
+ * Returns an object representing this plug-in's preferences.
+ *
+ * @return the Ant core object representing the preferences for this plug-in.
+ */
+ public AntCorePreferences getPreferences() {
+ if (preferences == null) {
+ preferences = new AntCorePreferences(extractExtensions(PT_TASKS), extractExtensions(PT_EXTRA_CLASSPATH), extractExtensions(PT_TYPES), extractExtensions(PT_PROPERTIES), false);
+ }
+ return preferences;
+ }
+
+ /**
+ * Set this plug-in's preferences for running headless based on the
+ * headless parameter.
+ * This method is public for testing purposes only. It should not
+ * be called outside of the Ant integration framework.
+ * @param headless Whether or not to mark that the plug-in is running headless or not
+ */
+ public void setRunningHeadless(boolean headless) {
+ preferences = new AntCorePreferences(extractExtensions(PT_TASKS), extractExtensions(PT_EXTRA_CLASSPATH), extractExtensions(PT_TYPES), extractExtensions(PT_PROPERTIES), headless);
+ }
+
+ /**
+ * Returns this plug-in instance.
+ *
+ * @return the single instance of this plug-in runtime class
+ */
+ public static AntCorePlugin getPlugin() {
+ return plugin;
+ }
+
+ /**
+ * Returns a new class loader to use when executing Ant builds.
+ *
+ * @return the new class loader
+ */
+ public ClassLoader getNewClassLoader() {
+ AntCorePreferences corePreferences = getPreferences();
+ return getNewClassLoader(false, corePreferences.getURLs());
+ }
+
+ /**
+ * Returns a new class loader to use when executing Ant builds.
+ * @param urls the URLs that define the classpath of the new classloader
+ * @return the new class loader
+ * @since 3.1
+ */
+ public URLClassLoader getNewClassLoader(URL[] urls) {
+ return getNewClassLoader(false, urls);
+ }
+
+ /**
+ * Returns a new class loader to use when executing Ant builds or
+ * other applications such as parsing or code proposal determination.
+ *
+ * @param allowLoading whether to allow plug-in classloaders associated
+ * with the new classloader to load Apache Ant classes or resources.
+ * @return the new class loader
+ */
+ public ClassLoader getNewClassLoader(boolean allowLoading) {
+ AntCorePreferences corePreferences = getPreferences();
+ URL[] urls = corePreferences.getURLs();
+ return getNewClassLoader(allowLoading, urls);
+ }
+
+ /**
+ * Returns a new class loader to use when executing Ant builds or
+ * other applications such as parsing or code proposal determination.
+ *
+ * @param allowLoading whether to allow plug-in classloaders associated
+ * with the new classloader to load Apache Ant classes or resources.
+ * @param urls the URLs that define the classpath of the new classloader
+ * @return the new class loader
+ * @since 3.1
+ */
+ public URLClassLoader getNewClassLoader(boolean allowLoading, URL[] urls) {
+ AntCorePreferences corePreferences = getPreferences();
+ ClassLoader[] pluginLoaders = corePreferences.getPluginClassLoaders();
+ AntClassLoader loader= new AntClassLoader(urls, pluginLoaders);
+ loader.allowPluginClassLoadersToLoadAnt(allowLoading);
+ return loader;
+ }
+
+ /**
+ * Logs the specified throwable with this plug-in's log.
+ *
+ * @param t throwable to log
+ * @since 2.1
+ */
+ public static void log(Throwable t) {
+ IStatus status= new Status(IStatus.ERROR, PI_ANTCORE, INTERNAL_ERROR, "Error logged from Ant Core: ", t); //$NON-NLS-1$
+ getPlugin().getLog().log(status);
+ }
+}
diff --git a/ant/org.eclipse.ant.core/src/org/eclipse/ant/core/AntSecurityException.java b/ant/org.eclipse.ant.core/src/org/eclipse/ant/core/AntSecurityException.java
new file mode 100644
index 000000000..1f8674177
--- /dev/null
+++ b/ant/org.eclipse.ant.core/src/org/eclipse/ant/core/AntSecurityException.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 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:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.core;
+
+
+/**
+ * A security exception that is thrown by the AntSecurityManager if
+ * an Ant task in some way attempts to halt or exit the Java Virtual Machine.
+ *
+ * Clients may instantiate this class; it is not intended to be subclassed.
+ * @since 2.1
+ * @noextend This class is not intended to be subclassed by clients.
+ */
+public class AntSecurityException extends SecurityException {
+
+ private static final long serialVersionUID = 1L;
+
+}
diff --git a/ant/org.eclipse.ant.core/src/org/eclipse/ant/core/IAntClasspathEntry.java b/ant/org.eclipse.ant.core/src/org/eclipse/ant/core/IAntClasspathEntry.java
new file mode 100644
index 000000000..4420669ae
--- /dev/null
+++ b/ant/org.eclipse.ant.core/src/org/eclipse/ant/core/IAntClasspathEntry.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 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:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.core;
+
+import java.net.URL;
+
+/**
+ * Represents an Ant classpath entry.
+ * Clients may implement this interface.
+ *
+ * @since 3.0
+ */
+public interface IAntClasspathEntry {
+
+ /**
+ * Returns the label for this classpath entry.
+ * @return the label for this entry.
+ */
+ public String getLabel();
+
+ /**
+ * Returns the URL for this classpath entry or <code>null</code>
+ * if it cannot be resolved.
+ *
+ * @return the url for this classpath entry.
+ */
+ public URL getEntryURL();
+
+ /**
+ * Returns whether this classpath entry requires the Eclipse runtime to be
+ * relevant. Defaults value is <code>true</code>
+ *
+ * @return whether this classpath entry requires the Eclipse runtime
+ */
+ public boolean isEclipseRuntimeRequired();
+}
diff --git a/ant/org.eclipse.ant.core/src/org/eclipse/ant/core/Task.java b/ant/org.eclipse.ant.core/src/org/eclipse/ant/core/Task.java
new file mode 100644
index 000000000..3d4eca593
--- /dev/null
+++ b/ant/org.eclipse.ant.core/src/org/eclipse/ant/core/Task.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 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:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.core;
+
+
+import org.eclipse.ant.internal.core.AntObject;
+
+/**
+ * Represents an Ant task.
+ * Clients may instantiate this class; it is not intended to be subclassed.
+ * @since 2.1
+ * @noextend This class is not intended to be subclassed by clients.
+ */
+public class Task extends AntObject {
+
+ /**
+ * Returns the name of the task
+ * @return the name of the task
+ */
+ public String getTaskName() {
+ return fName;
+ }
+
+ /**
+ * Sets the name of the task
+ * @param taskName The taskName to set
+ */
+ public void setTaskName(String taskName) {
+ fName= taskName;
+ }
+}
diff --git a/ant/org.eclipse.ant.core/src/org/eclipse/ant/core/Type.java b/ant/org.eclipse.ant.core/src/org/eclipse/ant/core/Type.java
new file mode 100644
index 000000000..429eacdbb
--- /dev/null
+++ b/ant/org.eclipse.ant.core/src/org/eclipse/ant/core/Type.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 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:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.core;
+
+
+import org.eclipse.ant.internal.core.AntObject;
+
+/**
+ * Represents an Ant type.
+ * Clients may instantiate this class; it is not intended to be subclassed.
+ * @since 2.1
+ * @noextend This class is not intended to be subclassed by clients.
+ */
+public class Type extends AntObject {
+
+ /**
+ * Returns the type name
+ * @return Returns a String
+ */
+ public String getTypeName() {
+ return fName;
+ }
+
+ /**
+ * Sets the taskName.
+ * @param taskName The taskName to set
+ */
+ public void setTypeName(String taskName) {
+ fName = taskName;
+ }
+}
diff --git a/ant/org.eclipse.ant.core/src/org/eclipse/ant/core/package.html b/ant/org.eclipse.ant.core/src/org/eclipse/ant/core/package.html
new file mode 100644
index 000000000..a931089a5
--- /dev/null
+++ b/ant/org.eclipse.ant.core/src/org/eclipse/ant/core/package.html
@@ -0,0 +1,14 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+ <title>Package-level Javadoc</title>
+</head>
+<body>
+Provides support for running the Ant build tool in the platform.
+<h2>
+Package Specification</h2>
+This package defines a number of task and data types and various infrastructure
+pieces which make Ant in the platform easier and more powerful.
+</body>
+</html>
diff --git a/ant/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/AbstractEclipseBuildLogger.java b/ant/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/AbstractEclipseBuildLogger.java
new file mode 100644
index 000000000..33c2299d1
--- /dev/null
+++ b/ant/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/AbstractEclipseBuildLogger.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.internal.core;
+
+import java.util.Map;
+
+import org.eclipse.ant.core.AntCorePlugin;
+
+public abstract class AbstractEclipseBuildLogger {
+
+ /**
+ * Process identifier - used to link the Eclipse Ant build
+ * loggers to a process.
+ */
+ public static final String ANT_PROCESS_ID = AntCorePlugin.PI_ANTCORE + ".ANT_PROCESS_ID"; //$NON-NLS-1$
+
+ protected String fProcessId= null;
+
+ public void configure(Map userProperties) {
+ fProcessId= (String) userProperties.remove(ANT_PROCESS_ID);
+ }
+} \ No newline at end of file
diff --git a/ant/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/AntClassLoader.java b/ant/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/AntClassLoader.java
new file mode 100644
index 000000000..06a1dc20b
--- /dev/null
+++ b/ant/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/AntClassLoader.java
@@ -0,0 +1,169 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2007 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
+ * Tom Tromey (tromey@redhat.com) - patch for bug 40972
+ *******************************************************************************/
+package org.eclipse.ant.internal.core;
+
+
+import java.io.IOException;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.List;
+
+public class AntClassLoader extends URLClassLoader {
+
+ private static final String ANT_PACKAGES_PREFIX = "org.apache.tools"; //$NON-NLS-1$
+ private static final String ANT_URL_PREFIX = "org/apache/tools"; //$NON-NLS-1$
+
+ private boolean fAllowPluginLoading = false;
+
+ protected ClassLoader[] fPluginLoaders;
+
+ private ClassLoader fContextClassloader = null;
+
+ public AntClassLoader(URL[] urls, ClassLoader[] pluginLoaders) {
+ super(urls, ClassLoader.getSystemClassLoader());
+ fPluginLoaders = pluginLoaders;
+ }
+
+ /*
+ * @see java.net.URLClassLoader#findClass(java.lang.String)
+ */
+ protected Class findClass(String name) throws ClassNotFoundException {
+ Class result = null;
+ //check whether to load the Apache Ant classes from the plug-in class loaders
+ //or to only load from the URLs specified from the Ant runtime classpath preferences setting
+ if (fAllowPluginLoading || !(name.startsWith(ANT_PACKAGES_PREFIX))) {
+ result = loadClassPlugins(name);
+ }
+
+ if (result != null) {
+ return result;
+ }
+
+ return super.findClass(name);
+ }
+
+ protected Class loadClassPlugins(String name) {
+ //remove this class loader as the context class loader
+ //when loading classes from plug-ins...see bug 94471
+ ClassLoader originalClassLoader = Thread.currentThread().getContextClassLoader();
+ if (fContextClassloader != null) {
+ Thread.currentThread().setContextClassLoader(fContextClassloader);
+ }
+ try {
+ Class result = null;
+ if (fPluginLoaders != null) {
+ for (int i = 0; (i < fPluginLoaders.length) && (result == null); i++) {
+ try {
+ result = fPluginLoaders[i].loadClass(name);
+ } catch (ClassNotFoundException e) {
+ // Ignore exception now. If necessary we'll throw
+ // a ClassNotFoundException in loadClass(String)
+ }
+ }
+ }
+ return result;
+ } finally {
+ Thread.currentThread().setContextClassLoader(originalClassLoader);
+ }
+ }
+
+ /*
+ * @see java.net.URLClassLoader#findResource(java.lang.String)
+ */
+ public URL findResource(String name) {
+ if (fAllowPluginLoading || !(name.startsWith(ANT_URL_PREFIX))) {
+ URL result = findResourcePlugins(name);
+ if (result != null) {
+ return result;
+ }
+ }
+
+ return super.findResource(name);
+ }
+
+ private URL findResourcePlugins(String name) {
+ //remove this class loader as the context class loader
+ //when loading resources from plug-ins...see bug 94471
+ ClassLoader originalClassLoader = Thread.currentThread().getContextClassLoader();
+ if (fContextClassloader != null) {
+ Thread.currentThread().setContextClassLoader(fContextClassloader);
+ }
+ try {
+ URL result = null;
+ if (fPluginLoaders != null) {
+ for (int i = 0; i < fPluginLoaders.length; i++) {
+ result = fPluginLoaders[i].getResource(name);
+ if (result != null) {
+ return result;
+ }
+ }
+ }
+ } finally {
+ Thread.currentThread().setContextClassLoader(originalClassLoader);
+ }
+ return null;
+ }
+
+ /*
+ * @see java.net.URLClassLoader#findResources(java.lang.String)
+ */
+ public Enumeration findResources(String name) throws IOException {
+ ClassLoader originalClassLoader = Thread.currentThread().getContextClassLoader();
+ if (fContextClassloader != null) {
+ Thread.currentThread().setContextClassLoader(fContextClassloader);
+ }
+ List all = new ArrayList();
+ try {
+ if (fAllowPluginLoading || !(name.startsWith(ANT_URL_PREFIX) || name.startsWith(ANT_URL_PREFIX, 1))) {
+ if (fPluginLoaders != null) {
+ Enumeration result = null;
+ for (int i = 0; i < fPluginLoaders.length; i++) {
+ result = fPluginLoaders[i].getResources(name);
+ while (result.hasMoreElements()) {
+ all.add(result.nextElement());
+ }
+ }
+ }
+ }
+
+ Enumeration superResources = super.findResources(name);
+ if (all.isEmpty()) {
+ return superResources;
+ }
+
+ while (superResources.hasMoreElements()) {
+ all.add(superResources.nextElement());
+ }
+ return Collections.enumeration(all);
+ } finally {
+ Thread.currentThread().setContextClassLoader(originalClassLoader);
+ }
+ }
+
+ /**
+ * Sets whether this class loader will allow Apache Ant classes or resources to be found or
+ * loaded from its set of plug-in class loaders.
+ *
+ * @param allowLoading whether or not to allow the plug-in class loaders
+ * to load the Apache Ant classes or resources
+ */
+ public void allowPluginClassLoadersToLoadAnt(boolean allowLoading) {
+ fAllowPluginLoading = allowLoading;
+ }
+
+ public void setPluginContextClassloader(ClassLoader classLoader) {
+ fContextClassloader = classLoader;
+ }
+} \ No newline at end of file
diff --git a/ant/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/AntPropertyValueProvider.java b/ant/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/AntPropertyValueProvider.java
new file mode 100644
index 000000000..cd28025ef
--- /dev/null
+++ b/ant/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/AntPropertyValueProvider.java
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * Copyright (c) 2003, 2006 BBDO Detroit 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:
+ * Thierry Lach (thierry.lach@bbdodetroit.com) - initial API and implementation for bug 40502
+ * IBM Corporation - added eclipse.running property, bug 65655
+ *******************************************************************************/
+package org.eclipse.ant.internal.core;
+
+import java.io.File;
+import java.net.URL;
+
+import org.eclipse.ant.core.AntCorePlugin;
+import org.eclipse.ant.core.IAntPropertyValueProvider;
+import org.eclipse.core.runtime.FileLocator;
+
+/**
+ * Dynamic provider for Ant properties.
+ *
+ * Provides the dynamic values for the following Ant properties:
+ *
+ * <ul>
+ * <li><code>eclipse.home</code> - set to the Eclipse installation directory</li>
+ * </ul>
+ * * <ul>
+ * <li><code>eclipse.running</code> - set (to "true") when Eclipse is running</li>
+ * </ul>
+ *
+ * @since 3.0
+ */
+public class AntPropertyValueProvider implements IAntPropertyValueProvider {
+ /**
+ * Returns the dynamic property values for Ant properties.
+ *
+ * @param propertyName The name of the property to resolve the value for
+ * @return The resolved value for the property
+ * @see org.eclipse.ant.core.IAntPropertyValueProvider#getAntPropertyValue(String)
+ */
+ public String getAntPropertyValue(String propertyName) {
+ String value = null;
+ if ("eclipse.running".equals(propertyName)){ //$NON-NLS-1$
+ return "true"; //$NON-NLS-1$
+ } else if ("eclipse.home".equals(propertyName)) { //$NON-NLS-1$
+ try {
+ value = new File(FileLocator.resolve(new URL("platform:/base/")).getPath()).getAbsolutePath(); //$NON-NLS-1$
+ if (value.endsWith("/")) { //$NON-NLS-1$
+ value = value.substring(0, value.length() - 1);
+ }
+ } catch (Exception e) {
+ AntCorePlugin.log(e);
+ }
+ }
+ return value;
+ }
+} \ No newline at end of file
diff --git a/ant/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/AntSecurityManager.java b/ant/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/AntSecurityManager.java
new file mode 100644
index 000000000..fd79ddeea
--- /dev/null
+++ b/ant/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/AntSecurityManager.java
@@ -0,0 +1,373 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 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:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.internal.core;
+
+
+import java.io.FileDescriptor;
+import java.net.InetAddress;
+import java.net.SocketPermission;
+import java.security.Permission;
+import java.util.PropertyPermission;
+import org.eclipse.ant.core.AntSecurityException;
+
+/**
+ * A security manager that always throws an <code>AntSecurityException</code>
+ * if the calling thread attempts to cause the Java Virtual Machine to
+ * exit/halt or if the restricted thread attempts to set a System property.
+ * Otherwise this manager just delegates to the pre-existing manager
+ * passed in the constructor or mimics the default security manager behavior
+ */
+public class AntSecurityManager extends SecurityManager {
+
+ private SecurityManager fSecurityManager= null;
+ private Thread fRestrictedThread= null;
+ //ensure that the PropertyPermission class is loaded before we
+ //start checking permissions: bug 85908
+ private static final PropertyPermission fgPropertyPermission= new PropertyPermission("*", "write"); //$NON-NLS-1$ //$NON-NLS-2$
+
+ private boolean fAllowSettingSystemProperties= true;
+
+ public AntSecurityManager(SecurityManager securityManager, Thread restrictedThread, boolean allowSettingProperties) {
+ fSecurityManager= securityManager;
+ fRestrictedThread= restrictedThread;
+ fAllowSettingSystemProperties= allowSettingProperties;
+ }
+
+ public AntSecurityManager(SecurityManager securityManager, Thread restrictedThread) {
+ this(securityManager, restrictedThread, true);
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.SecurityManager#checkExit(int)
+ */
+ public void checkExit(int status) {
+ //no exit allowed from the restricted thread...System.exit is being called
+ //by some ant task...do not want Eclipse to exit if
+ //in the same VM.
+ if (Thread.currentThread() == fRestrictedThread) {
+ throw new AntSecurityException();
+ }
+ if (fSecurityManager != null) {
+ fSecurityManager.checkExit(status);
+ }
+ }
+ /* (non-Javadoc)
+ * @see java.lang.SecurityManager#checkAccept(java.lang.String, int)
+ */
+ public void checkAccept(String host, int port) {
+ if (fSecurityManager != null) {
+ fSecurityManager.checkAccept(host, port);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.SecurityManager#checkAccess(java.lang.Thread)
+ */
+ public void checkAccess(Thread t) {
+ if (fSecurityManager != null) {
+ fSecurityManager.checkAccess(t);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.SecurityManager#checkAccess(java.lang.ThreadGroup)
+ */
+ public void checkAccess(ThreadGroup g) {
+ if (fSecurityManager != null) {
+ fSecurityManager.checkAccess(g);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.SecurityManager#checkAwtEventQueueAccess()
+ */
+ public void checkAwtEventQueueAccess() {
+ if (fSecurityManager != null) {
+ fSecurityManager.checkAwtEventQueueAccess();
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.SecurityManager#checkConnect(java.lang.String, int, java.lang.Object)
+ */
+ public void checkConnect(String host, int port, Object context) {
+ if (fSecurityManager != null) {
+ fSecurityManager.checkConnect(host, port, context);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.SecurityManager#checkConnect(java.lang.String, int)
+ */
+ public void checkConnect(String host, int port) {
+ if (fSecurityManager != null) {
+ fSecurityManager.checkConnect(host, port);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.SecurityManager#checkCreateClassLoader()
+ */
+ public void checkCreateClassLoader() {
+ if (fSecurityManager != null) {
+ fSecurityManager.checkCreateClassLoader();
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.SecurityManager#checkDelete(java.lang.String)
+ */
+ public void checkDelete(String file) {
+ if (fSecurityManager != null) {
+ fSecurityManager.checkDelete(file);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.SecurityManager#checkExec(java.lang.String)
+ */
+ public void checkExec(String cmd) {
+ if (fSecurityManager != null) {
+ fSecurityManager.checkExec(cmd);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.SecurityManager#checkLink(java.lang.String)
+ */
+ public void checkLink(String lib) {
+ if (fSecurityManager != null) {
+ fSecurityManager.checkLink(lib);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.SecurityManager#checkListen(int)
+ */
+ public void checkListen(int port) {
+ if (fSecurityManager != null) {
+ fSecurityManager.checkListen(port);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.SecurityManager#checkMemberAccess(java.lang.Class, int)
+ */
+ public void checkMemberAccess(Class clazz, int which) {
+ if (fSecurityManager != null) {
+ fSecurityManager.checkMemberAccess(clazz, which);
+ }
+ }
+
+ /**
+ * @see java.lang.SecurityManager#checkMulticast(java.net.InetAddress, byte)
+ * @deprecated
+ */
+ public void checkMulticast(InetAddress maddr, byte ttl) {
+ if (fSecurityManager != null) {
+ String host = maddr.getHostAddress();
+ if (!host.startsWith("[") && host.indexOf(':') != -1) { //$NON-NLS-1$
+ host = "[" + host + "]"; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ checkPermission(new SocketPermission(host, "accept,connect")); //$NON-NLS-1$
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.SecurityManager#checkMulticast(java.net.InetAddress)
+ */
+ public void checkMulticast(InetAddress maddr) {
+ if (fSecurityManager != null) {
+ fSecurityManager.checkMulticast(maddr);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.SecurityManager#checkPackageAccess(java.lang.String)
+ */
+ public void checkPackageAccess(String pkg) {
+ if (fSecurityManager != null) {
+ fSecurityManager.checkPackageAccess(pkg);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.SecurityManager#checkPackageDefinition(java.lang.String)
+ */
+ public void checkPackageDefinition(String pkg) {
+ if (fSecurityManager != null) {
+ fSecurityManager.checkPackageDefinition(pkg);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.SecurityManager#checkPermission(java.security.Permission, java.lang.Object)
+ */
+ public void checkPermission(Permission perm, Object context) {
+ if (fSecurityManager != null) {
+ fSecurityManager.checkPermission(perm, context);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.SecurityManager#checkPermission(java.security.Permission)
+ */
+ public void checkPermission(Permission perm) {
+ if (!fAllowSettingSystemProperties && fgPropertyPermission.implies(perm) && fRestrictedThread == Thread.currentThread()) {
+ //attempting to write a system property
+ throw new AntSecurityException();
+ }
+ if (fSecurityManager != null) {
+ fSecurityManager.checkPermission(perm);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.SecurityManager#checkPrintJobAccess()
+ */
+ public void checkPrintJobAccess() {
+ if (fSecurityManager != null) {
+ fSecurityManager.checkPrintJobAccess();
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.SecurityManager#checkPropertiesAccess()
+ */
+ public void checkPropertiesAccess() {
+ if (fSecurityManager != null) {
+ fSecurityManager.checkPropertiesAccess();
+ }
+ super.checkPropertiesAccess();
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.SecurityManager#checkPropertyAccess(java.lang.String)
+ */
+ public void checkPropertyAccess(String key) {
+ if (fSecurityManager != null) {
+ fSecurityManager.checkPropertyAccess(key);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.SecurityManager#checkRead(java.io.FileDescriptor)
+ */
+ public void checkRead(FileDescriptor fd) {
+ if (fSecurityManager != null) {
+ fSecurityManager.checkRead(fd);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.SecurityManager#checkRead(java.lang.String, java.lang.Object)
+ */
+ public void checkRead(String file, Object context) {
+ if (fSecurityManager != null) {
+ fSecurityManager.checkRead(file, context);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.SecurityManager#checkRead(java.lang.String)
+ */
+ public void checkRead(String file) {
+ if (fSecurityManager != null) {
+ fSecurityManager.checkRead(file);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.SecurityManager#checkSecurityAccess(java.lang.String)
+ */
+ public void checkSecurityAccess(String target) {
+ if (fSecurityManager != null) {
+ fSecurityManager.checkSecurityAccess(target);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.SecurityManager#checkSetFactory()
+ */
+ public void checkSetFactory() {
+ if (fSecurityManager != null) {
+ fSecurityManager.checkSetFactory();
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.SecurityManager#checkSystemClipboardAccess()
+ */
+ public void checkSystemClipboardAccess() {
+ if (fSecurityManager != null) {
+ fSecurityManager.checkSystemClipboardAccess();
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.SecurityManager#checkTopLevelWindow(java.lang.Object)
+ */
+ public boolean checkTopLevelWindow(Object window) {
+ if (fSecurityManager != null) {
+ return fSecurityManager.checkTopLevelWindow(window);
+ }
+ return super.checkTopLevelWindow(window);
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.SecurityManager#checkWrite(java.io.FileDescriptor)
+ */
+ public void checkWrite(FileDescriptor fd) {
+ if (fSecurityManager != null) {
+ fSecurityManager.checkWrite(fd);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.SecurityManager#checkWrite(java.lang.String)
+ */
+ public void checkWrite(String file) {
+ if (fSecurityManager != null) {
+ fSecurityManager.checkWrite(file);
+ }
+ }
+
+ /**
+ * @see java.lang.SecurityManager#getInCheck()
+ * @deprecated
+ */
+ public boolean getInCheck() {
+ if (fSecurityManager != null) {
+ return fSecurityManager.getInCheck();
+ }
+ return super.getInCheck();
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.SecurityManager#getSecurityContext()
+ */
+ public Object getSecurityContext() {
+ if (fSecurityManager != null) {
+ return fSecurityManager.getSecurityContext();
+ }
+ return super.getSecurityContext();
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.SecurityManager#getThreadGroup()
+ */
+ public ThreadGroup getThreadGroup() {
+ if (fSecurityManager != null) {
+ fSecurityManager.getThreadGroup();
+ }
+ return super.getThreadGroup();
+ }
+}
diff --git a/ant/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/InternalCoreAntMessages.java b/ant/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/InternalCoreAntMessages.java
new file mode 100644
index 000000000..22f65e636
--- /dev/null
+++ b/ant/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/InternalCoreAntMessages.java
@@ -0,0 +1,35 @@
+/**********************************************************************
+ * Copyright (c) 2000, 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:
+ * IBM - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.ant.internal.core;
+
+import org.eclipse.osgi.util.NLS;
+
+public class InternalCoreAntMessages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.ant.internal.core.InternalCoreAntMessages";//$NON-NLS-1$
+
+ public static String AntCorePreferences_Malformed_URL__1;
+ public static String AntCorePreferences_Library_not_specified_for___0__4;
+ public static String AntCorePreferences_No_library_for_task;
+ public static String AntCorePreferences_No_library_for_type;
+ public static String AntCorePreferences_8;
+ public static String AntCorePreferences_6;
+ public static String AntCorePreferences_0;
+ public static String AntCorePreferences_1;
+
+ public static String AntRunner_Could_not_find_one_or_more_classes__Please_check_the_Ant_classpath__1;
+ public static String AntRunner_Could_not_find_one_or_more_classes__Please_check_the_Ant_classpath__2;
+ public static String AntRunner_Build_Failed__3;
+ public static String AntRunner_Already_in_progess;
+
+ static {
+ // load message values from bundle file
+ NLS.initializeMessages(BUNDLE_NAME, InternalCoreAntMessages.class);
+ }
+} \ No newline at end of file
diff --git a/ant/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/InternalCoreAntMessages.properties b/ant/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/InternalCoreAntMessages.properties
new file mode 100644
index 000000000..a3ffd92c5
--- /dev/null
+++ b/ant/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/InternalCoreAntMessages.properties
@@ -0,0 +1,24 @@
+###############################################################################
+# Copyright (c) 2000, 2006 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
+###############################################################################
+
+AntCorePreferences_Malformed_URL__1=Malformed URL.
+AntCorePreferences_Library_not_specified_for___0__4=Library not specified for: {0}
+AntCorePreferences_No_library_for_task=The library \"{0}\" specified from \"{1}\" for the antTasks extension does not exist
+AntCorePreferences_No_library_for_type=The library \"{0}\" specified from \"{1}\" for the antTypes extension of does not exist
+AntCorePreferences_8=The library \"{0}\" specified from \"{1}\" for the antTasks or antTypes extension does not exist
+AntCorePreferences_6=The library \"{0}\" specified from \"{1}\" for the extraClasspathEntries extension does not exist
+AntCorePreferences_0=Exception parsing bundle manifest file.
+AntCorePreferences_1=Host not found for the fragment: {0}
+
+AntRunner_Could_not_find_one_or_more_classes__Please_check_the_Ant_classpath__1=Could not find one or more classes. Please check the Ant classpath.
+AntRunner_Could_not_find_one_or_more_classes__Please_check_the_Ant_classpath__2=Could not find one or more classes: \"{0}\". Please check the Ant classpath.
+AntRunner_Build_Failed__3=BUILD FAILED
+AntRunner_Already_in_progess=Ant build {0} already in progress. Concurrent Ant builds are possible if you specify to build in a separate JRE.
diff --git a/ant/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/contentDescriber/AntBuildfileContentDescriber.java b/ant/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/contentDescriber/AntBuildfileContentDescriber.java
new file mode 100644
index 000000000..1cedf9dab
--- /dev/null
+++ b/ant/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/contentDescriber/AntBuildfileContentDescriber.java
@@ -0,0 +1,118 @@
+/*******************************************************************************
+ * 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:
+ * IBM Corporation - initial API and implementation
+ * Philippe Ombredanne (pombredanne@nexb.com) - bug 125367
+ *******************************************************************************/
+package org.eclipse.ant.internal.core.contentDescriber;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Reader;
+
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExecutableExtension;
+import org.eclipse.core.runtime.content.IContentDescription;
+import org.eclipse.core.runtime.content.XMLContentDescriber;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+
+/**
+ * A content describer for Ant buildfiles.
+ * <p>
+ * If project top level element is found
+ * then if:
+ * target sub-elements are found returns VALID
+ * default attribute is found returns VALID
+ * some other likely Ant element is found (classpath, import, macrodef, path, property, taskdef, typedef) returns VALID
+ * else:
+ * returns INDETERMINATE
+ * else
+ * returns INDETERMINATE
+ * </p>
+ *
+ * @since 3.1
+ */
+public final class AntBuildfileContentDescriber extends XMLContentDescriber implements IExecutableExtension {
+
+ /* (Intentionally not included in javadoc)
+ * Determines the validation status for the given contents.
+ *
+ * @param contents the contents to be evaluated
+ * @return one of the following:<ul>
+ * <li><code>VALID</code></li>,
+ * <li><code>INVALID</code></li>,
+ * <li><code>INDETERMINATE</code></li>
+ * </ul>
+ * @throws IOException
+ */
+ private int checkCriteria(InputSource contents) throws IOException {
+ AntHandler antHandler = new AntHandler();
+ try {
+ if (!antHandler.parseContents(contents)) {
+ return INDETERMINATE;
+ }
+ } catch (SAXException e) {
+ // we may be handed any kind of contents... it is normal we fail to parse
+ return INDETERMINATE;
+ } catch (ParserConfigurationException e) {
+ // some bad thing happened - force this describer to be disabled
+ String message = "Internal Error: XML parser configuration error during content description for Ant buildfiles"; //$NON-NLS-1$
+ throw new RuntimeException(message);
+ }
+ // Check to see if we matched our criteria.
+ if (antHandler.hasRootProjectElement()) {
+ if (antHandler.hasProjectDefaultAttribute() || antHandler.hasTargetElement() || antHandler.hasAntElement()) {
+ //project and default attribute or project and target element(s)
+ //or project and top level ant element(s) (classpath, import, macrodef, path, property, taskdef, typedef)
+ return VALID;
+ }
+ //only a top level project element...maybe an Ant buildfile
+ return INDETERMINATE;
+ }
+
+ return INDETERMINATE;
+ }
+
+ /* (Intentionally not included in javadoc)
+ * @see IContentDescriber#describe(InputStream, IContentDescription)
+ */
+ public int describe(InputStream contents, IContentDescription description) throws IOException {
+ // call the basic XML describer to do basic recognition
+ if (super.describe(contents, description) == INVALID) {
+ return INVALID;
+ }
+ // super.describe will have consumed some chars, need to rewind
+ contents.reset();
+ // Check to see if we matched our criteria.
+ return checkCriteria(new InputSource(contents));
+ }
+
+ /* (Intentionally not included in javadoc)
+ * @see IContentDescriber#describe(Reader, IContentDescription)
+ */
+ public int describe(Reader contents, IContentDescription description) throws IOException {
+ // call the basic XML describer to do basic recognition
+ if (super.describe(contents, description) == INVALID) {
+ return INVALID;
+ }
+ // super.describe will have consumed some chars, need to rewind
+ contents.reset();
+ // Check to see if we matched our criteria.
+ return checkCriteria(new InputSource(contents));
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.runtime.IExecutableExtension#setInitializationData(org.eclipse.core.runtime.IConfigurationElement, java.lang.String, java.lang.Object)
+ */
+ public void setInitializationData(IConfigurationElement config, String propertyName, Object data) throws CoreException {
+ }
+} \ No newline at end of file
diff --git a/ant/org.eclipse.ant.core/src_ant/META-INF/eclipse.inf b/ant/org.eclipse.ant.core/src_ant/META-INF/eclipse.inf
new file mode 100644
index 000000000..b4df3ab63
--- /dev/null
+++ b/ant/org.eclipse.ant.core/src_ant/META-INF/eclipse.inf
@@ -0,0 +1 @@
+jarprocessor.exclude.sign=true \ No newline at end of file
diff --git a/ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/DemuxInputStreamSetter.java b/ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/DemuxInputStreamSetter.java
new file mode 100644
index 000000000..78e824d0c
--- /dev/null
+++ b/ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/DemuxInputStreamSetter.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * 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:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.internal.core.ant;
+
+
+import org.apache.tools.ant.DemuxInputStream;
+import org.apache.tools.ant.Project;
+
+/**
+ * This class exists so that the Ant integration has backwards compatibility
+ * with Ant releases previous to 1.6. DemuxInputStream is a new class to Ant 1.6.
+ */
+class DemuxInputStreamSetter {
+
+ protected void remapSystemIn(Project project) {
+ System.setIn(new DemuxInputStream(project));
+ }
+}
diff --git a/ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/EclipseAntMain.java b/ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/EclipseAntMain.java
new file mode 100644
index 000000000..b50b591ac
--- /dev/null
+++ b/ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/EclipseAntMain.java
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.core.ant;
+
+import java.util.Iterator;
+
+import org.apache.tools.ant.BuildListener;
+import org.apache.tools.ant.Main;
+import org.apache.tools.ant.Project;
+
+public class EclipseAntMain extends Main {
+
+ private Project fEclipseAntProject;
+
+ public EclipseAntMain(Project eclipseAntProject) {
+ super();
+ fEclipseAntProject = eclipseAntProject;
+ }
+
+ public static void run(String[] args, Project eclipseAntProject) {
+ Main projectHelpMain = new EclipseAntMain(eclipseAntProject);
+ projectHelpMain.startAnt(args, null, null);
+ }
+
+ /*
+ * @see org.apache.tools.ant.Main#exit(int)
+ */
+ protected void exit(int exitCode) {
+ //disallow system exit
+ }
+
+ /*
+ * @see org.apache.tools.ant.Main#addBuildListeners(org.apache.tools.ant.Project)
+ */
+ protected void addBuildListeners(Project project) {
+ Iterator listeners = fEclipseAntProject.getBuildListeners().iterator();
+ while (listeners.hasNext()) {
+ project.addBuildListener((BuildListener) listeners.next());
+ }
+ }
+}
diff --git a/ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/EclipseDefaultExecutor.java b/ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/EclipseDefaultExecutor.java
new file mode 100644
index 000000000..0daa35a7c
--- /dev/null
+++ b/ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/EclipseDefaultExecutor.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.internal.core.ant;
+
+import java.util.Arrays;
+import java.util.Vector;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Executor;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.helper.DefaultExecutor;
+
+public class EclipseDefaultExecutor extends DefaultExecutor {
+
+ private static final EclipseSingleCheckExecutor SUB_EXECUTOR = new EclipseSingleCheckExecutor();
+
+ /* (non-Javadoc)
+ * @see org.apache.tools.ant.Executor#executeTargets(org.apache.tools.ant.Project, java.lang.String[])
+ */
+ public void executeTargets(Project project, String[] targetNames) throws BuildException {
+ Vector v= new Vector();
+ v.addAll(Arrays.asList(targetNames));
+ project.addReference("eclipse.ant.targetVector", v); //$NON-NLS-1$
+ super.executeTargets(project, targetNames);
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.tools.ant.Executor#getSubProjectExecutor()
+ */
+ public Executor getSubProjectExecutor() {
+ return SUB_EXECUTOR;
+ }
+}
diff --git a/ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/EclipseMainHelper.java b/ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/EclipseMainHelper.java
new file mode 100644
index 000000000..64525022d
--- /dev/null
+++ b/ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/EclipseMainHelper.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.core.ant;
+
+import org.apache.tools.ant.Project;
+
+public class EclipseMainHelper {
+
+ protected void runProjectHelp(String buildFileLocation, Project eclipseAntProject) {
+ EclipseAntMain.run(new String[]{"-f", buildFileLocation, "-p"}, eclipseAntProject); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ protected void runUsage(String buildFileLocation, Project eclipseAntProject) {
+ EclipseAntMain.run(new String[]{"-f", buildFileLocation, "-h"}, eclipseAntProject); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+}
diff --git a/ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/EclipseSingleCheckExecutor.java b/ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/EclipseSingleCheckExecutor.java
new file mode 100644
index 000000000..e6549b62e
--- /dev/null
+++ b/ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/EclipseSingleCheckExecutor.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.internal.core.ant;
+
+import java.util.Arrays;
+import java.util.Vector;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Executor;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.helper.SingleCheckExecutor;
+
+public class EclipseSingleCheckExecutor extends SingleCheckExecutor {
+
+ /* (non-Javadoc)
+ * @see org.apache.tools.ant.Executor#executeTargets(org.apache.tools.ant.Project, java.lang.String[])
+ */
+ public void executeTargets(Project project, String[] targetNames) throws BuildException {
+ Vector v= new Vector();
+ v.addAll(Arrays.asList(targetNames));
+ project.addReference("eclipse.ant.targetVector", v); //$NON-NLS-1$
+ super.executeTargets(project, targetNames);
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.tools.ant.Executor#getSubProjectExecutor()
+ */
+ public Executor getSubProjectExecutor() {
+ return this;
+ }
+}
diff --git a/ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/ExecutorSetter.java b/ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/ExecutorSetter.java
new file mode 100644
index 000000000..03759f20e
--- /dev/null
+++ b/ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/ExecutorSetter.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.internal.core.ant;
+
+import org.apache.tools.ant.Executor;
+import org.apache.tools.ant.Project;
+
+/**
+ * This class exists so that the Ant integration has backwards compatibility
+ * with Ant releases previous to 1.6.3. Executors are a new feature of Ant 1.6.3.
+ */
+public class ExecutorSetter {
+
+ protected void setExecutor(Project project) {
+ Executor executor= new EclipseDefaultExecutor();
+ project.setExecutor(executor);
+ }
+}
diff --git a/ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/FailInputHandler.java b/ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/FailInputHandler.java
new file mode 100644
index 000000000..52155b315
--- /dev/null
+++ b/ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/FailInputHandler.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.ant.internal.core.ant;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+import org.apache.tools.ant.input.DefaultInputHandler;
+
+public class FailInputHandler extends DefaultInputHandler {
+
+ protected InputStream getInputStream() {
+ //ensure any attempts to read input fail
+ return new InputStream(){
+ public int read() throws IOException {
+ throw new IOException();
+ }
+ };
+ }
+}
diff --git a/ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/InputHandlerSetter.java b/ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/InputHandlerSetter.java
new file mode 100644
index 000000000..42965b924
--- /dev/null
+++ b/ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/InputHandlerSetter.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * 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.core.ant;
+
+
+import java.text.MessageFormat; // can't use ICU in ant
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.input.DefaultInputHandler;
+import org.apache.tools.ant.input.InputHandler;
+
+/**
+ * This class exists so that the Ant integration has backwards compatibility
+ * with Ant releases previous to 1.5. InputHandlers are a new feature of Ant 1.5.
+ */
+class InputHandlerSetter {
+
+ protected void setInputHandler(Project project, String inputHandlerClassname) {
+ InputHandler handler = null;
+ if (inputHandlerClassname == null) {
+ handler = new DefaultInputHandler();
+ } else {
+ try {
+ handler = (InputHandler)(Class.forName(inputHandlerClassname).newInstance());
+ } catch (ClassCastException e) {
+ String msg = MessageFormat.format(InternalAntMessages.InternalAntRunner_handler_does_not_implement_InputHandler5, new String[]{inputHandlerClassname});
+ throw new BuildException(msg, e);
+ } catch (Exception e) {
+ String msg = MessageFormat.format(InternalAntMessages.InternalAntRunner_Unable_to_instantiate_input_handler_class, new String[]{inputHandlerClassname, e.getClass().getName()});
+ throw new BuildException(msg, e);
+ }
+ }
+ project.setInputHandler(handler);
+ project.setProjectReference(handler);
+ }
+}
diff --git a/ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/InternalProject.java b/ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/InternalProject.java
new file mode 100644
index 000000000..8a0aab2c3
--- /dev/null
+++ b/ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/InternalProject.java
@@ -0,0 +1,178 @@
+/*******************************************************************************
+ * 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 - derived implementation
+ *******************************************************************************/
+
+package org.eclipse.ant.internal.core.ant;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.text.MessageFormat; // can't use ICU, ant build script
+import java.util.Enumeration;
+import java.util.Hashtable;
+import java.util.Properties;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.ProjectComponent;
+
+/**
+ * A subclass of Project to facilitate "faster" parsing with
+ * less garbage generated. This class is not used on Ant 1.6 and newer
+ * due to the improvements in lazy loading of these Ant versions.
+ *
+ * Only three tasks are loaded (property, taskdef and
+ * typedef: three tasks that can be defined outside of a target on Ant 1.5.1 or older).
+ *
+ * Datatypes are loaded if requested.
+ *
+ * Derived from the original Ant Project class
+ */
+public class InternalProject extends Project {
+
+ private Hashtable typeNameToClass = null;
+
+ public InternalProject() {
+ super();
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.tools.ant.Project#init()
+ */
+ public void init() throws BuildException {
+ setJavaVersionProperty();
+
+ try {
+ Class taskClass = Class.forName("org.apache.tools.ant.taskdefs.Property"); //$NON-NLS-1$
+ addTaskDefinition("property", taskClass); //$NON-NLS-1$
+ taskClass = Class.forName("org.apache.tools.ant.taskdefs.Typedef"); //$NON-NLS-1$
+ addTaskDefinition("typedef", taskClass); //$NON-NLS-1$
+ taskClass = Class.forName("org.apache.tools.ant.taskdefs.Taskdef"); //$NON-NLS-1$
+ addTaskDefinition("taskdef", taskClass); //$NON-NLS-1$
+ } catch (NoClassDefFoundError e) {
+ throw new BuildException(InternalAntMessages.InternalAntRunner_Missing_Class, e);
+ } catch (ClassNotFoundException c) {
+ throw new BuildException(InternalAntMessages.InternalAntRunner_Missing_Class, c);
+ }
+
+ setSystemProperties();
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.tools.ant.Project#createDataType(java.lang.String)
+ */
+ public Object createDataType(String typeName) throws BuildException {
+ if (typeNameToClass == null) {
+ initializeTypes();
+ }
+ Class typeClass = (Class) typeNameToClass.get(typeName);
+
+ if (typeClass == null) {
+ return null;
+ }
+
+ Throwable thrown = null;
+ try {
+ Constructor ctor = null;
+ boolean noArg = false;
+ // DataType can have a "no arg" constructor or take a single
+ // Project argument.
+ try {
+ ctor = typeClass.getConstructor(new Class[0]);
+ noArg = true;
+ } catch (NoSuchMethodException nse) {
+ ctor = typeClass.getConstructor(new Class[] { Project.class });
+ noArg = false;
+ }
+
+ Object o = null;
+ if (noArg) {
+ o = ctor.newInstance(new Object[0]);
+ } else {
+ o = ctor.newInstance(new Object[] { this });
+ }
+ if (o instanceof ProjectComponent) {
+ ((ProjectComponent) o).setProject(this);
+ }
+ return o;
+ } catch (InvocationTargetException ite) {
+ thrown = ite.getTargetException();
+ } catch (IllegalArgumentException e) {
+ thrown = e;
+ } catch (InstantiationException e) {
+ thrown = e;
+ } catch (IllegalAccessException e) {
+ thrown = e;
+ } catch (NoSuchMethodException nse) {
+ thrown = nse;
+ } catch (NoClassDefFoundError ncdfe) {
+ thrown = ncdfe;
+ }
+ if (thrown != null) {
+ String message= MessageFormat.format(InternalAntMessages.InternalProject_could_not_create_type, new String[]{typeName, thrown.toString()});
+ throw new BuildException(message, thrown);
+ }
+ // this line is actually unreachable
+ return null;
+ }
+
+ /**
+ * Initialize the mapping of data type name to data type classname
+ */
+ private void initializeTypes() {
+ typeNameToClass = new Hashtable(18);
+ String dataDefs = "/org/apache/tools/ant/types/defaults.properties"; //$NON-NLS-1$
+ try {
+ Properties props = new Properties();
+ InputStream in = Project.class.getResourceAsStream(dataDefs);
+ if (in == null) {
+ return;
+ }
+ props.load(in);
+ in.close();
+
+ Enumeration enumeration = props.propertyNames();
+ while (enumeration.hasMoreElements()) {
+ String typeName = (String) enumeration.nextElement();
+ String className = props.getProperty(typeName);
+ try {
+ Class typeClass= Class.forName(className);
+ typeNameToClass.put(typeName, typeClass);
+ } catch (NoClassDefFoundError e) {
+ //ignore
+ } catch (ClassNotFoundException c) {
+ //ignore
+ }
+ }
+ } catch (IOException ioe) {
+ return;
+ }
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.tools.ant.Project#getDataTypeDefinitions()
+ */
+ public Hashtable getDataTypeDefinitions() {
+ if (typeNameToClass == null) {
+ initializeTypes();
+ }
+ return typeNameToClass;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.tools.ant.Project#addDataTypeDefinition(java.lang.String, java.lang.Class)
+ */
+ public void addDataTypeDefinition(String typeName, Class typeClass) {
+ getDataTypeDefinitions();
+ typeNameToClass.put(typeName, typeClass);
+ }
+}
diff --git a/ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/InternalProject2.java b/ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/InternalProject2.java
new file mode 100644
index 000000000..85ae17fa1
--- /dev/null
+++ b/ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/InternalProject2.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.internal.core.ant;
+
+import org.apache.tools.ant.AntClassLoader;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.types.Path;
+
+public class InternalProject2 extends Project {
+
+ /* (non-Javadoc)
+ * @see org.apache.tools.ant.Project#createClassLoader(org.apache.tools.ant.types.Path)
+ */
+ public AntClassLoader createClassLoader(Path path) {
+ AntClassLoader loader= super.createClassLoader(path);
+ if (path == null) {
+ //use the "fake" Eclipse runtime classpath for Ant
+ loader.setClassPath(Path.systemClasspath);
+ }
+
+ return loader;
+ }
+} \ No newline at end of file
diff --git a/ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/NullInputHandler.java b/ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/NullInputHandler.java
new file mode 100644
index 000000000..c6609622c
--- /dev/null
+++ b/ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/NullInputHandler.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 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:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.ant.internal.core.ant;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.input.InputHandler;
+import org.apache.tools.ant.input.InputRequest;
+
+/**
+ * A input handler that does nothing with input requests
+ * Used to ensure we do not block while retrieving targets from an Ant buildfile
+ * that has an input task in the top level implicit target
+ */
+public class NullInputHandler implements InputHandler {
+
+ public NullInputHandler() {
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.tools.ant.input.InputHandler#handleInput(org.apache.tools.ant.input.InputRequest)
+ */
+ public void handleInput(InputRequest request) throws BuildException {
+ }
+}
diff --git a/ant/org.eclipse.ant.launching/.classpath b/ant/org.eclipse.ant.launching/.classpath
new file mode 100644
index 000000000..a8eb00e30
--- /dev/null
+++ b/ant/org.eclipse.ant.launching/.classpath
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" output="loggers_bin" path="loggers"/>
+ <classpathentry kind="src" output="common_bin" path="common"/>
+ <classpathentry kind="src" output="remote_bin" path="remote"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/ant/org.eclipse.ant.launching/.externalToolBuilders/build common debug [Builder].launch b/ant/org.eclipse.ant.launching/.externalToolBuilders/build common debug [Builder].launch
new file mode 100644
index 000000000..2f1ec55b7
--- /dev/null
+++ b/ant/org.eclipse.ant.launching/.externalToolBuilders/build common debug [Builder].launch
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
+<booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/>
+<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
+<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${working_set:&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;launchConfigurationWorkingSet editPageId=&quot;org.eclipse.ui.resourceWorkingSetPage&quot; factoryID=&quot;org.eclipse.ui.internal.WorkingSetFactory&quot; id=&quot;1254539808328_112&quot; label=&quot;working set&quot; name=&quot;working set&quot;&gt;&#13;&#10;&lt;item factoryID=&quot;org.eclipse.ui.internal.model.ResourceFactory&quot; path=&quot;/org.eclipse.ant.launching/lib&quot; type=&quot;2&quot;/&gt;&#13;&#10;&lt;/launchConfigurationWorkingSet&gt;}"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.eclipse.ant.launching/buildfiles/buildCommonDebug.xml"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
+<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.ant.launching"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_BUILD_SCOPE" value="${working_set:&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;launchConfigurationWorkingSet editPageId=&quot;org.eclipse.ui.resourceWorkingSetPage&quot; factoryID=&quot;org.eclipse.ui.internal.WorkingSetFactory&quot; id=&quot;1254539834953_113&quot; label=&quot;workingSet&quot; name=&quot;workingSet&quot;&gt;&#13;&#10;&lt;item factoryID=&quot;org.eclipse.ui.internal.model.ResourceFactory&quot; path=&quot;/org.eclipse.ant.launching/common&quot; type=&quot;2&quot;/&gt;&#13;&#10;&lt;/launchConfigurationWorkingSet&gt;}"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/org.eclipse.ant.launching/buildfiles/buildCommonDebug.xml}"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,auto,"/>
+<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
+<stringAttribute key="process_factory_id" value="org.eclipse.ant.ui.remoteAntProcessFactory"/>
+</launchConfiguration>
diff --git a/ant/org.eclipse.ant.launching/.externalToolBuilders/build loggers [Builder].launch b/ant/org.eclipse.ant.launching/.externalToolBuilders/build loggers [Builder].launch
new file mode 100644
index 000000000..ec718d8f8
--- /dev/null
+++ b/ant/org.eclipse.ant.launching/.externalToolBuilders/build loggers [Builder].launch
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
+<booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/>
+<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
+<booleanAttribute key="org.eclipse.ant.uiSET_INPUTHANDLER" value="false"/>
+<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${working_set:&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;launchConfigurationWorkingSet editPageId=&quot;org.eclipse.ui.resourceWorkingSetPage&quot; factoryID=&quot;org.eclipse.ui.internal.WorkingSetFactory&quot; id=&quot;1254539604968_29&quot; label=&quot;working set&quot; name=&quot;working set&quot;&gt;&#13;&#10;&lt;item factoryID=&quot;org.eclipse.ui.internal.model.ResourceFactory&quot; path=&quot;/org.eclipse.ant.launching/lib&quot; type=&quot;2&quot;/&gt;&#13;&#10;&lt;/launchConfigurationWorkingSet&gt;}"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.eclipse.ant.launching/buildfiles/buildLoggers.xml"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
+<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.ant.launching"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_BUILD_SCOPE" value="${working_set:&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;launchConfigurationWorkingSet editPageId=&quot;org.eclipse.ui.resourceWorkingSetPage&quot; factoryID=&quot;org.eclipse.ui.internal.WorkingSetFactory&quot; id=&quot;1254539671875_56&quot; label=&quot;workingSet&quot; name=&quot;workingSet&quot;&gt;&#13;&#10;&lt;item factoryID=&quot;org.eclipse.ui.internal.model.ResourceFactory&quot; path=&quot;/org.eclipse.ant.launching/loggers&quot; type=&quot;2&quot;/&gt;&#13;&#10;&lt;/launchConfigurationWorkingSet&gt;}"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/org.eclipse.ant.launching/buildfiles/buildLoggers.xml}"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,auto,"/>
+<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
+<stringAttribute key="process_factory_id" value="org.eclipse.ant.ui.remoteAntProcessFactory"/>
+</launchConfiguration>
diff --git a/ant/org.eclipse.ant.launching/.externalToolBuilders/build remote support [Builder].launch b/ant/org.eclipse.ant.launching/.externalToolBuilders/build remote support [Builder].launch
new file mode 100644
index 000000000..c56eb96fa
--- /dev/null
+++ b/ant/org.eclipse.ant.launching/.externalToolBuilders/build remote support [Builder].launch
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
+<booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/>
+<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
+<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${working_set:&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;launchConfigurationWorkingSet factoryID=&quot;org.eclipse.ui.internal.WorkingSetFactory&quot; id=&quot;1254617191468_44&quot; label=&quot;working set&quot; name=&quot;working set&quot;&gt;&#13;&#10;&lt;item factoryID=&quot;org.eclipse.ui.internal.model.ResourceFactory&quot; path=&quot;/org.eclipse.ant.launching/lib&quot; type=&quot;2&quot;/&gt;&#13;&#10;&lt;/launchConfigurationWorkingSet&gt;}"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.eclipse.ant.launching/buildfiles/buildRemote.xml"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
+<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.ant.launching"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_BUILD_SCOPE" value="${working_set:&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;launchConfigurationWorkingSet factoryID=&quot;org.eclipse.ui.internal.WorkingSetFactory&quot; id=&quot;1254617206453_45&quot; label=&quot;workingSet&quot; name=&quot;workingSet&quot;&gt;&#13;&#10;&lt;item factoryID=&quot;org.eclipse.ui.internal.model.ResourceFactory&quot; path=&quot;/org.eclipse.ant.launching/remote&quot; type=&quot;2&quot;/&gt;&#13;&#10;&lt;/launchConfigurationWorkingSet&gt;}"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/org.eclipse.ant.launching/buildfiles/buildRemote.xml}"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,auto,"/>
+<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
+<stringAttribute key="process_factory_id" value="org.eclipse.ant.ui.remoteAntProcessFactory"/>
+</launchConfiguration>
diff --git a/ant/org.eclipse.ant.launching/.project b/ant/org.eclipse.ant.launching/.project
new file mode 100644
index 000000000..5f704efb4
--- /dev/null
+++ b/ant/org.eclipse.ant.launching/.project
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.ant.launching</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
+ <triggers>auto,full,incremental,</triggers>
+ <arguments>
+ <dictionary>
+ <key>LaunchConfigHandle</key>
+ <value>&lt;project&gt;/.externalToolBuilders/build loggers [Builder].launch</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
+ <triggers>auto,full,incremental,</triggers>
+ <arguments>
+ <dictionary>
+ <key>LaunchConfigHandle</key>
+ <value>&lt;project&gt;/.externalToolBuilders/build common debug [Builder].launch</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
+ <triggers>auto,full,incremental,</triggers>
+ <arguments>
+ <dictionary>
+ <key>LaunchConfigHandle</key>
+ <value>&lt;project&gt;/.externalToolBuilders/build remote support [Builder].launch</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ </natures>
+</projectDescription>
diff --git a/ant/org.eclipse.ant.launching/about.html b/ant/org.eclipse.ant.launching/about.html
new file mode 100644
index 000000000..599392518
--- /dev/null
+++ b/ant/org.eclipse.ant.launching/about.html
@@ -0,0 +1,53 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>October 8, 2009</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
+
+<h3>Third Party Content</h3>
+
+<p>The Content includes items that have been sourced from third parties as set out below. If you
+did not receive this Content directly from the Eclipse Foundation, the following is provided
+for informational purposes only, and you should look to the Redistributor&rsquo;s license for
+terms and conditions of use.</p>
+
+<h4>Ant 1.7.1</h4>
+
+<p>The following classes in the plug-in JAR are based on Ant code developed by The Apache Software Foundation and shall be defined as the &quot;Ant-Derived Work&quot;:</p>
+
+<ul>
+ <li>org.eclipse.ant.internal.launching.remote.InternalAntRunner</li>
+</ul>
+
+<p>The object code for InternalAntRunner is located in lib/remote.jar and the source code is located in lib/remotesrc.zip.</p>
+
+<p>Your use of the Ant-Derived Work is subject to the terms and conditions of the Apache Software License 2.0. A copy of the license is contained
+in the file <a href="about_files/asl-v20.txt" target="_blank">about_files/asl-v20.txt</a> and is also available at
+<a href="http://www.apache.org/licenses/LICENSE-2.0.html" target="_blank">http://www.apache.org/licenses/LICENSE-2.0.html</a>.</p>
+
+<p>The names &quot;Ant&quot; and &quot;Apache Software Foundation&quot; must not be used to endorse or promote products derived from this
+software without prior written permission. For written permission, please contact <a href="mailto:apache@apache.org">apache@apache.org</a>.</p>
+
+<p>The Apache attribution <a href="about_files/NOTICE" target="_blank">NOTICE</a> file is included with the Content in accordance with 4d of the Apache License, Version 2.0.</p>
+</body>
+</html> \ No newline at end of file
diff --git a/ant/org.eclipse.ant.launching/build.properties b/ant/org.eclipse.ant.launching/build.properties
new file mode 100644
index 000000000..f7a9d05b8
--- /dev/null
+++ b/ant/org.eclipse.ant.launching/build.properties
@@ -0,0 +1,32 @@
+###############################################################################
+# Copyright (c) 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
+###############################################################################
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ plugin.properties,\
+ lib/antdebug.jar,\
+ lib/loggers.jar,\
+ lib/remote.jar,\
+ about.html
+
+jars.compile.order = .,\
+ lib/antdebug.jar,\
+ lib/loggers.jar,\
+ lib/remote.jar
+source.lib/loggers.jar = loggers/
+output.lib/loggers.jar = loggers_bin/
+source.lib/antdebug.jar = common/
+output.lib/antdebug.jar = common_bin/
+source.lib/remote.jar = remote/
+output.lib/remote.jar = remote_bin/
+src.includes = about.html
diff --git a/ant/org.eclipse.ant.launching/buildfiles/buildCommonDebug.xml b/ant/org.eclipse.ant.launching/buildfiles/buildCommonDebug.xml
new file mode 100644
index 000000000..88b99eb55
--- /dev/null
+++ b/ant/org.eclipse.ant.launching/buildfiles/buildCommonDebug.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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
+ -->
+
+<project name="Build Ant common debug support JAR" default="build" basedir="..">
+
+ <target name="build" description="Cleans, builds and refreshes" depends="clean, lib/antdebuglib.jar"/>
+
+ <target name="init">
+ <property name="temp.folder" value="${basedir}/temp.folder"/>
+ <property name="build.result.folder" value="${basedir}"/>
+ </target>
+
+ <target name="lib/antdebuglib.jar" description= "Creates the antdebug.jar" depends="init">
+ <property name="destdir" value="${temp.folder}/lib/antdebug.jar.bin"/>
+ <delete dir="${destdir}"/>
+ <mkdir dir="${destdir}"/>
+ <!-- copy necessary class files resources -->
+ <copy todir="${destdir}">
+ <fileset dir="${basedir}/common_bin"/>
+ </copy>
+ <mkdir dir="${build.result.folder}/lib"/>
+ <jar destfile="${build.result.folder}/lib/antdebug.jar" basedir="${destdir}"/>
+ <delete dir="${temp.folder}"/>
+ </target>
+
+ <target name="clean" description="Deletes previous build remnants" depends="init">
+ <delete file="${build.result.folder}/lib/antdebug.jar"/>
+ <delete dir="${temp.folder}"/>
+ </target>
+</project>
diff --git a/ant/org.eclipse.ant.launching/buildfiles/buildLoggers.xml b/ant/org.eclipse.ant.launching/buildfiles/buildLoggers.xml
new file mode 100644
index 000000000..1dbb04c01
--- /dev/null
+++ b/ant/org.eclipse.ant.launching/buildfiles/buildLoggers.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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
+ -->
+
+<project name="Build Ant loggers support JAR" default="build" basedir="..">
+
+ <target name="build" description="Cleans, builds and refreshes" depends="clean, lib/loggerslib.jar"/>
+
+ <target name="init">
+ <property name="temp.folder" value="${basedir}/temp.folder"/>
+ <property name="build.result.folder" value="${basedir}"/>
+ </target>
+
+ <target name="lib/loggerslib.jar" description= "Creates the loggers.jar" depends="init">
+ <property name="destdir" value="${temp.folder}/lib/loggers.jar.bin"/>
+ <delete dir="${destdir}"/>
+ <mkdir dir="${destdir}"/>
+ <!-- copy necessary class files resources -->
+ <copy todir="${destdir}">
+ <fileset dir="${basedir}/loggers_bin/"/>
+ </copy>
+ <mkdir dir="${build.result.folder}/lib"/>
+ <jar destfile="${build.result.folder}/lib/loggers.jar" basedir="${destdir}"/>
+ <delete dir="${temp.folder}"/>
+ </target>
+
+ <target name="clean" description="Deletes previous build remnants" depends="init">
+ <delete file="${build.result.folder}/lib/loggers.jar"/>
+ <delete dir="${temp.folder}"/>
+ </target>
+</project>
diff --git a/ant/org.eclipse.ant.launching/buildfiles/buildRemote.xml b/ant/org.eclipse.ant.launching/buildfiles/buildRemote.xml
new file mode 100644
index 000000000..2122e5854
--- /dev/null
+++ b/ant/org.eclipse.ant.launching/buildfiles/buildRemote.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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
+ -->
+
+<project name="Build Ant remote support JAR" default="build" basedir="..">
+
+ <target name="build" description="Cleans, builds and refreshes" depends="clean, lib/remotelib.jar"/>
+
+ <target name="init">
+ <property name="temp.folder" value="${basedir}/temp.folder"/>
+ <property name="build.result.folder" value="${basedir}"/>
+ </target>
+
+ <target name="lib/remotelib.jar" description= "Creates the remote.jar" depends="init">
+ <property name="destdir" value="${temp.folder}/lib/remote.jar.bin"/>
+ <delete dir="${destdir}"/>
+ <mkdir dir="${destdir}"/>
+ <!-- copy necessary class files resources -->
+ <copy todir="${destdir}">
+ <fileset dir="${basedir}/remote_bin"/>
+ </copy>
+ <mkdir dir="${build.result.folder}/lib"/>
+ <jar destfile="${build.result.folder}/lib/remote.jar" basedir="${destdir}"/>
+ <delete dir="${temp.folder}"/>
+ </target>
+
+ <target name="clean" description="Deletes previous build remnants" depends="init">
+ <delete file="${build.result.folder}/lib/remote.jar"/>
+ <delete dir="${temp.folder}"/>
+ </target>
+</project>
diff --git a/ant/org.eclipse.ant.launching/common/META-INF/eclipse.inf b/ant/org.eclipse.ant.launching/common/META-INF/eclipse.inf
new file mode 100644
index 000000000..b4df3ab63
--- /dev/null
+++ b/ant/org.eclipse.ant.launching/common/META-INF/eclipse.inf
@@ -0,0 +1 @@
+jarprocessor.exclude.sign=true \ No newline at end of file
diff --git a/ant/org.eclipse.ant.launching/common/org/eclipse/ant/internal/launching/debug/IDebugBuildLogger.java b/ant/org.eclipse.ant.launching/common/org/eclipse/ant/internal/launching/debug/IDebugBuildLogger.java
new file mode 100644
index 000000000..9eb06c54b
--- /dev/null
+++ b/ant/org.eclipse.ant.launching/common/org/eclipse/ant/internal/launching/debug/IDebugBuildLogger.java
@@ -0,0 +1,21 @@
+/*******************************************************************************
+ * Copyright (c) 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.launching.debug;
+
+
+public interface IDebugBuildLogger {
+
+ /**
+ * Requests to suspend the build if the current debug state
+ * indicates that suspension is required.
+ */
+ public abstract void waitIfSuspended();
+} \ No newline at end of file
diff --git a/ant/org.eclipse.ant.launching/loggers/META-INF/eclipse.inf b/ant/org.eclipse.ant.launching/loggers/META-INF/eclipse.inf
new file mode 100644
index 000000000..b4df3ab63
--- /dev/null
+++ b/ant/org.eclipse.ant.launching/loggers/META-INF/eclipse.inf
@@ -0,0 +1 @@
+jarprocessor.exclude.sign=true \ No newline at end of file
diff --git a/ant/org.eclipse.ant.launching/loggers/org/eclipse/ant/internal/launching/runtime/logger/NullBuildLogger.java b/ant/org.eclipse.ant.launching/loggers/org/eclipse/ant/internal/launching/runtime/logger/NullBuildLogger.java
new file mode 100644
index 000000000..8d50250f3
--- /dev/null
+++ b/ant/org.eclipse.ant.launching/loggers/org/eclipse/ant/internal/launching/runtime/logger/NullBuildLogger.java
@@ -0,0 +1,179 @@
+/*******************************************************************************
+ * 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.launching.runtime.logger;
+
+
+import java.io.PrintStream;
+
+import org.apache.tools.ant.BuildEvent;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.BuildLogger;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.util.StringUtils;
+import org.eclipse.ant.core.AntSecurityException;
+import org.eclipse.ant.internal.core.AbstractEclipseBuildLogger;
+import org.eclipse.core.runtime.OperationCanceledException;
+
+public class NullBuildLogger extends AbstractEclipseBuildLogger implements BuildLogger{
+
+ protected int fMessageOutputLevel = Project.MSG_INFO;
+ private PrintStream fErr= null;
+ private PrintStream fOut= null;
+ protected boolean fEmacsMode= false;
+
+ /**
+ * An exception that has already been logged.
+ */
+ protected Throwable fHandledException= null;
+
+ /**
+ * @see org.apache.tools.ant.BuildLogger#setMessageOutputLevel(int)
+ */
+ public void setMessageOutputLevel(int level) {
+ fMessageOutputLevel= level;
+ }
+
+ protected int getMessageOutputLevel() {
+ return fMessageOutputLevel;
+ }
+
+ /**
+ * @see org.apache.tools.ant.BuildLogger#setEmacsMode(boolean)
+ */
+ public void setEmacsMode(boolean emacsMode) {
+ fEmacsMode= emacsMode;
+ }
+
+ /**
+ * @see org.apache.tools.ant.BuildListener#buildStarted(org.apache.tools.ant.BuildEvent)
+ */
+ public void buildStarted(BuildEvent event) {
+ }
+
+ /**
+ * @see org.apache.tools.ant.BuildListener#buildFinished(org.apache.tools.ant.BuildEvent)
+ */
+ public void buildFinished(BuildEvent event) {
+ String message= handleException(event);
+ if (message != null) {
+ logMessage(message, getMessageOutputLevel());
+ }
+ fHandledException= null;
+ }
+
+ /**
+ * @see org.apache.tools.ant.BuildListener#targetStarted(org.apache.tools.ant.BuildEvent)
+ */
+ public void targetStarted(BuildEvent event) {
+ }
+
+ /**
+ * @see org.apache.tools.ant.BuildListener#targetFinished(org.apache.tools.ant.BuildEvent)
+ */
+ public void targetFinished(BuildEvent event) {
+ }
+
+ /**
+ * @see org.apache.tools.ant.BuildListener#taskStarted(org.apache.tools.ant.BuildEvent)
+ */
+ public void taskStarted(BuildEvent event) {
+ }
+
+ /**
+ * @see org.apache.tools.ant.BuildListener#taskFinished(org.apache.tools.ant.BuildEvent)
+ */
+ public void taskFinished(BuildEvent event) {
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.tools.ant.BuildListener#messageLogged(org.apache.tools.ant.BuildEvent)
+ */
+ public void messageLogged(BuildEvent event) {
+ logMessage(event.getMessage(), event.getPriority());
+ }
+
+ protected PrintStream getErrorPrintStream() {
+ return fErr;
+ }
+
+ protected PrintStream getOutputPrintStream() {
+ return fOut;
+ }
+
+ /**
+ * @see org.apache.tools.ant.BuildLogger#setErrorPrintStream(java.io.PrintStream)
+ */
+ public void setErrorPrintStream(PrintStream err) {
+ //this build logger logs to "null" unless
+ //the user has explicitly set a logfile to use
+ if (err == System.err) {
+ fErr= null;
+ } else {
+ fErr= err;
+ }
+ }
+
+ /**
+ * @see org.apache.tools.ant.BuildLogger#setOutputPrintStream(java.io.PrintStream)
+ */
+ public void setOutputPrintStream(PrintStream output) {
+ //this build logger logs to "null" unless
+ //the user has explicitly set a logfile to use
+ if (output == System.out) {
+ fOut= null;
+ } else {
+ fOut= output;
+ }
+ }
+
+ protected void logMessage(String message, int priority) {
+ if (priority > getMessageOutputLevel()) {
+ return;
+ }
+
+ if (priority == Project.MSG_ERR) {
+ if (getErrorPrintStream() != null && getErrorPrintStream() != System.err) {
+ //user has designated to log to a logfile
+ getErrorPrintStream().println(message);
+ }
+ } else {
+ if (getOutputPrintStream() != null && getOutputPrintStream() != System.out) {
+ //user has designated to log to a logfile
+ getOutputPrintStream().println(message);
+ }
+ }
+ }
+
+ protected String handleException(BuildEvent event) {
+ Throwable exception = event.getException();
+ if (exception == null || exception == fHandledException
+ || exception instanceof OperationCanceledException
+ || exception instanceof AntSecurityException) {
+ return null;
+ }
+ fHandledException= exception;
+ StringBuffer message= new StringBuffer();
+ message.append(StringUtils.LINE_SEP);
+ message.append(RuntimeMessages.NullBuildLogger_1);
+ message.append(StringUtils.LINE_SEP);
+ if (Project.MSG_VERBOSE <= fMessageOutputLevel || !(exception instanceof BuildException)) {
+ message.append(StringUtils.getStackTrace(exception));
+ } else {
+ if (exception instanceof BuildException) {
+ message.append(exception.toString()).append(StringUtils.LINE_SEP);
+ } else {
+ message.append(exception.getMessage()).append(StringUtils.LINE_SEP);
+ }
+ }
+
+ return message.toString();
+ }
+}
diff --git a/ant/org.eclipse.ant.launching/loggers/org/eclipse/ant/internal/launching/runtime/logger/RuntimeMessages.java b/ant/org.eclipse.ant.launching/loggers/org/eclipse/ant/internal/launching/runtime/logger/RuntimeMessages.java
new file mode 100644
index 000000000..a1db5586c
--- /dev/null
+++ b/ant/org.eclipse.ant.launching/loggers/org/eclipse/ant/internal/launching/runtime/logger/RuntimeMessages.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * 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 - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.internal.launching.runtime.logger;
+
+import org.eclipse.osgi.util.NLS;
+
+public class RuntimeMessages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.ant.internal.launching.runtime.logger.RuntimeMessages";//$NON-NLS-1$
+
+ public static String NullBuildLogger_1;
+ public static String AntProcessBuildLogger_Total_time;
+ public static String AntProcessBuildLogger__minutes_2;
+ public static String AntProcessBuildLogger__minute_3;
+ public static String AntProcessBuildLogger__seconds_4;
+ public static String AntProcessBuildLogger__second_5;
+ public static String AntProcessBuildLogger__milliseconds_6;
+
+ public static String AntProcessDebugBuildLogger_1;
+
+ static {
+ // load message values from bundle file
+ NLS.initializeMessages(BUNDLE_NAME, RuntimeMessages.class);
+ }
+} \ No newline at end of file
diff --git a/ant/org.eclipse.ant.launching/loggers/org/eclipse/ant/internal/launching/runtime/logger/RuntimeMessages.properties b/ant/org.eclipse.ant.launching/loggers/org/eclipse/ant/internal/launching/runtime/logger/RuntimeMessages.properties
new file mode 100644
index 000000000..573188a0f
--- /dev/null
+++ b/ant/org.eclipse.ant.launching/loggers/org/eclipse/ant/internal/launching/runtime/logger/RuntimeMessages.properties
@@ -0,0 +1,20 @@
+###############################################################################
+# 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
+###############################################################################
+
+NullBuildLogger_1=BUILD FAILED
+AntProcessBuildLogger_Total_time=Total time:
+AntProcessBuildLogger__minutes_2=\ minutes
+AntProcessBuildLogger__minute_3=\ minute
+AntProcessBuildLogger__seconds_4=\ seconds
+AntProcessBuildLogger__second_5=\ second
+AntProcessBuildLogger__milliseconds_6=\ milliseconds
+
+AntProcessDebugBuildLogger_1=Build cancelled.
diff --git a/ant/org.eclipse.ant.launching/plugin.properties b/ant/org.eclipse.ant.launching/plugin.properties
new file mode 100644
index 000000000..650fb4ff5
--- /dev/null
+++ b/ant/org.eclipse.ant.launching/plugin.properties
@@ -0,0 +1,24 @@
+###############################################################################
+# Copyright (c) 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
+###############################################################################
+
+pluginName=Ant Launching Support
+providerName=Eclipse.org
+
+AntBuild = Ant Build
+AntLaunchDelegate.name=Eclipse Ant Launcher
+AntLaunchDelegate.description=The Eclipse Ant Launcher supports running and debugging Ant build files.
+
+AntBuilder.name=Ant Builder
+AntBuilderLaunchDelegate.name= Eclipse Ant Builder Launcher
+AntBuilderLaunchDelegate.description=The Eclipse Ant Builder Launcher supports running Ant build files.
+
+antBreakpointGroupName= Ant Breakpoints
+AntLineBreakpoint.name = Ant Line Breakpoint \ No newline at end of file
diff --git a/ant/org.eclipse.ant.launching/remote/META-INF/eclipse.inf b/ant/org.eclipse.ant.launching/remote/META-INF/eclipse.inf
new file mode 100644
index 000000000..b4df3ab63
--- /dev/null
+++ b/ant/org.eclipse.ant.launching/remote/META-INF/eclipse.inf
@@ -0,0 +1 @@
+jarprocessor.exclude.sign=true \ No newline at end of file
diff --git a/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/AntSecurityException.java b/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/AntSecurityException.java
new file mode 100644
index 000000000..294b248a9
--- /dev/null
+++ b/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/AntSecurityException.java
@@ -0,0 +1,23 @@
+/*******************************************************************************
+ * 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.launching.remote;
+
+/**
+ * A security exception that is thrown by the AntSecurityManager if
+ * an Ant task in some way attempts to halt or exit the Java Virtual Machine.
+ *
+ * @since 2.1
+ */
+public class AntSecurityException extends SecurityException {
+
+ private static final long serialVersionUID = 1L;
+
+}
diff --git a/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/AntSecurityManager.java b/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/AntSecurityManager.java
new file mode 100644
index 000000000..30f7ebb0c
--- /dev/null
+++ b/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/AntSecurityManager.java
@@ -0,0 +1,371 @@
+/*******************************************************************************
+ * 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.launching.remote;
+
+
+import java.io.FileDescriptor;
+import java.net.InetAddress;
+import java.net.SocketPermission;
+import java.security.Permission;
+import java.util.PropertyPermission;
+
+/**
+ * A security manager that always throws an <code>AntSecurityException</code>
+ * if the calling thread attempts to cause the Java Virtual Machine to
+ * exit/halt or if the restricted thread attempts to set a System property.
+ * Otherwise this manager just delegates to the pre-existing manager
+ * passed in the constructor or mimics the default security manager behavior
+ */
+public class AntSecurityManager extends SecurityManager {
+
+ private SecurityManager fSecurityManager= null;
+ private Thread fRestrictedThread= null;
+ //ensure that the PropertyPermission class is loaded before we
+ //start checking permissions: bug 85908
+ private static final PropertyPermission fgPropertyPermission= new PropertyPermission("*", "write"); //$NON-NLS-1$ //$NON-NLS-2$
+
+ private boolean fAllowSettingSystemProperties= true;
+
+ public AntSecurityManager(SecurityManager securityManager, Thread restrictedThread, boolean allowSettingProperties) {
+ fSecurityManager= securityManager;
+ fRestrictedThread= restrictedThread;
+ fAllowSettingSystemProperties= allowSettingProperties;
+ }
+
+ public AntSecurityManager(SecurityManager securityManager, Thread restrictedThread) {
+ this(securityManager, restrictedThread, true);
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.SecurityManager#checkExit(int)
+ */
+ public void checkExit(int status) {
+ //no exit allowed from the restricted thread...System.exit is being called
+ //by some ant task...disallow the exit
+ if (Thread.currentThread() == fRestrictedThread) {
+ throw new AntSecurityException();
+ }
+ if (fSecurityManager != null) {
+ fSecurityManager.checkExit(status);
+ }
+ }
+ /* (non-Javadoc)
+ * @see java.lang.SecurityManager#checkAccept(java.lang.String, int)
+ */
+ public void checkAccept(String host, int port) {
+ if (fSecurityManager != null) {
+ fSecurityManager.checkAccept(host, port);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.SecurityManager#checkAccess(java.lang.Thread)
+ */
+ public void checkAccess(Thread t) {
+ if (fSecurityManager != null) {
+ fSecurityManager.checkAccess(t);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.SecurityManager#checkAccess(java.lang.ThreadGroup)
+ */
+ public void checkAccess(ThreadGroup g) {
+ if (fSecurityManager != null) {
+ fSecurityManager.checkAccess(g);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.SecurityManager#checkAwtEventQueueAccess()
+ */
+ public void checkAwtEventQueueAccess() {
+ if (fSecurityManager != null) {
+ fSecurityManager.checkAwtEventQueueAccess();
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.SecurityManager#checkConnect(java.lang.String, int, java.lang.Object)
+ */
+ public void checkConnect(String host, int port, Object context) {
+ if (fSecurityManager != null) {
+ fSecurityManager.checkConnect(host, port, context);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.SecurityManager#checkConnect(java.lang.String, int)
+ */
+ public void checkConnect(String host, int port) {
+ if (fSecurityManager != null) {
+ fSecurityManager.checkConnect(host, port);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.SecurityManager#checkCreateClassLoader()
+ */
+ public void checkCreateClassLoader() {
+ if (fSecurityManager != null) {
+ fSecurityManager.checkCreateClassLoader();
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.SecurityManager#checkDelete(java.lang.String)
+ */
+ public void checkDelete(String file) {
+ if (fSecurityManager != null) {
+ fSecurityManager.checkDelete(file);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.SecurityManager#checkExec(java.lang.String)
+ */
+ public void checkExec(String cmd) {
+ if (fSecurityManager != null) {
+ fSecurityManager.checkExec(cmd);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.SecurityManager#checkLink(java.lang.String)
+ */
+ public void checkLink(String lib) {
+ if (fSecurityManager != null) {
+ fSecurityManager.checkLink(lib);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.SecurityManager#checkListen(int)
+ */
+ public void checkListen(int port) {
+ if (fSecurityManager != null) {
+ fSecurityManager.checkListen(port);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.SecurityManager#checkMemberAccess(java.lang.Class, int)
+ */
+ public void checkMemberAccess(Class clazz, int which) {
+ if (fSecurityManager != null) {
+ fSecurityManager.checkMemberAccess(clazz, which);
+ }
+ }
+
+ /**
+ * @see java.lang.SecurityManager#checkMulticast(java.net.InetAddress, byte)
+ * @deprecated
+ */
+ public void checkMulticast(InetAddress maddr, byte ttl) {
+ if (fSecurityManager != null) {
+ String host = maddr.getHostAddress();
+ if (!host.startsWith("[") && host.indexOf(':') != -1) { //$NON-NLS-1$
+ host = "[" + host + "]"; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ checkPermission(new SocketPermission(host, "accept,connect")); //$NON-NLS-1$
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.SecurityManager#checkMulticast(java.net.InetAddress)
+ */
+ public void checkMulticast(InetAddress maddr) {
+ if (fSecurityManager != null) {
+ fSecurityManager.checkMulticast(maddr);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.SecurityManager#checkPackageAccess(java.lang.String)
+ */
+ public void checkPackageAccess(String pkg) {
+ if (fSecurityManager != null) {
+ fSecurityManager.checkPackageAccess(pkg);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.SecurityManager#checkPackageDefinition(java.lang.String)
+ */
+ public void checkPackageDefinition(String pkg) {
+ if (fSecurityManager != null) {
+ fSecurityManager.checkPackageDefinition(pkg);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.SecurityManager#checkPermission(java.security.Permission, java.lang.Object)
+ */
+ public void checkPermission(Permission perm, Object context) {
+ if (fSecurityManager != null) {
+ fSecurityManager.checkPermission(perm, context);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.SecurityManager#checkPermission(java.security.Permission)
+ */
+ public void checkPermission(Permission perm) {
+ if (!fAllowSettingSystemProperties && fgPropertyPermission.implies(perm) && fRestrictedThread == Thread.currentThread()) {
+ //attempting to write a system property
+ throw new AntSecurityException();
+ }
+ if (fSecurityManager != null) {
+ fSecurityManager.checkPermission(perm);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.SecurityManager#checkPrintJobAccess()
+ */
+ public void checkPrintJobAccess() {
+ if (fSecurityManager != null) {
+ fSecurityManager.checkPrintJobAccess();
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.SecurityManager#checkPropertiesAccess()
+ */
+ public void checkPropertiesAccess() {
+ if (fSecurityManager != null) {
+ fSecurityManager.checkPropertiesAccess();
+ }
+ super.checkPropertiesAccess();
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.SecurityManager#checkPropertyAccess(java.lang.String)
+ */
+ public void checkPropertyAccess(String key) {
+ if (fSecurityManager != null) {
+ fSecurityManager.checkPropertyAccess(key);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.SecurityManager#checkRead(java.io.FileDescriptor)
+ */
+ public void checkRead(FileDescriptor fd) {
+ if (fSecurityManager != null) {
+ fSecurityManager.checkRead(fd);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.SecurityManager#checkRead(java.lang.String, java.lang.Object)
+ */
+ public void checkRead(String file, Object context) {
+ if (fSecurityManager != null) {
+ fSecurityManager.checkRead(file, context);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.SecurityManager#checkRead(java.lang.String)
+ */
+ public void checkRead(String file) {
+ if (fSecurityManager != null) {
+ fSecurityManager.checkRead(file);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.SecurityManager#checkSecurityAccess(java.lang.String)
+ */
+ public void checkSecurityAccess(String target) {
+ if (fSecurityManager != null) {
+ fSecurityManager.checkSecurityAccess(target);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.SecurityManager#checkSetFactory()
+ */
+ public void checkSetFactory() {
+ if (fSecurityManager != null) {
+ fSecurityManager.checkSetFactory();
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.SecurityManager#checkSystemClipboardAccess()
+ */
+ public void checkSystemClipboardAccess() {
+ if (fSecurityManager != null) {
+ fSecurityManager.checkSystemClipboardAccess();
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.SecurityManager#checkTopLevelWindow(java.lang.Object)
+ */
+ public boolean checkTopLevelWindow(Object window) {
+ if (fSecurityManager != null) {
+ return fSecurityManager.checkTopLevelWindow(window);
+ }
+ return super.checkTopLevelWindow(window);
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.SecurityManager#checkWrite(java.io.FileDescriptor)
+ */
+ public void checkWrite(FileDescriptor fd) {
+ if (fSecurityManager != null) {
+ fSecurityManager.checkWrite(fd);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.SecurityManager#checkWrite(java.lang.String)
+ */
+ public void checkWrite(String file) {
+ if (fSecurityManager != null) {
+ fSecurityManager.checkWrite(file);
+ }
+ }
+
+ /**
+ * @see java.lang.SecurityManager#getInCheck()
+ * @deprecated
+ */
+ public boolean getInCheck() {
+ if (fSecurityManager != null) {
+ return fSecurityManager.getInCheck();
+ }
+ return super.getInCheck();
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.SecurityManager#getSecurityContext()
+ */
+ public Object getSecurityContext() {
+ if (fSecurityManager != null) {
+ return fSecurityManager.getSecurityContext();
+ }
+ return super.getSecurityContext();
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.SecurityManager#getThreadGroup()
+ */
+ public ThreadGroup getThreadGroup() {
+ if (fSecurityManager != null) {
+ fSecurityManager.getThreadGroup();
+ }
+ return super.getThreadGroup();
+ }
+}
diff --git a/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/DemuxInputStreamSetter.java b/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/DemuxInputStreamSetter.java
new file mode 100644
index 000000000..9111611c2
--- /dev/null
+++ b/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/DemuxInputStreamSetter.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * 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
+ *******************************************************************************/
+package org.eclipse.ant.internal.launching.remote;
+
+
+import org.apache.tools.ant.DemuxInputStream;
+import org.apache.tools.ant.Project;
+
+/**
+ * This class exists so that the Ant integration has backwards compatibility
+ * with Ant releases previous to 1.6. DemuxInputStream is a new class to Ant 1.6.
+ */
+class DemuxInputStreamSetter {
+
+ protected void remapSystemIn(Project project) {
+ System.setIn(new DemuxInputStream(project));
+ }
+}
diff --git a/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/EclipseDefaultExecutor.java b/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/EclipseDefaultExecutor.java
new file mode 100644
index 000000000..6b86f5d62
--- /dev/null
+++ b/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/EclipseDefaultExecutor.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * 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
+ *******************************************************************************/
+package org.eclipse.ant.internal.launching.remote;
+
+import java.util.Arrays;
+import java.util.Vector;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Executor;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.helper.DefaultExecutor;
+
+public class EclipseDefaultExecutor extends DefaultExecutor {
+
+ private static final EclipseSingleCheckExecutor SUB_EXECUTOR = new EclipseSingleCheckExecutor();
+
+ /* (non-Javadoc)
+ * @see org.apache.tools.ant.Executor#executeTargets(org.apache.tools.ant.Project, java.lang.String[])
+ */
+ public void executeTargets(Project project, String[] targetNames) throws BuildException {
+ Vector v= new Vector();
+ v.addAll(Arrays.asList(targetNames));
+ project.addReference("eclipse.ant.targetVector", v); //$NON-NLS-1$
+ super.executeTargets(project, targetNames);
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.tools.ant.Executor#getSubProjectExecutor()
+ */
+ public Executor getSubProjectExecutor() {
+ return SUB_EXECUTOR;
+ }
+}
diff --git a/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/EclipseSingleCheckExecutor.java b/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/EclipseSingleCheckExecutor.java
new file mode 100644
index 000000000..62ddd4fe0
--- /dev/null
+++ b/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/EclipseSingleCheckExecutor.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * 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
+ *******************************************************************************/
+package org.eclipse.ant.internal.launching.remote;
+
+import java.util.Arrays;
+import java.util.Vector;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Executor;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.helper.SingleCheckExecutor;
+
+public class EclipseSingleCheckExecutor extends SingleCheckExecutor {
+
+ /* (non-Javadoc)
+ * @see org.apache.tools.ant.Executor#executeTargets(org.apache.tools.ant.Project, java.lang.String[])
+ */
+ public void executeTargets(Project project, String[] targetNames) throws BuildException {
+ Vector v= new Vector();
+ v.addAll(Arrays.asList(targetNames));
+ project.addReference("eclipse.ant.targetVector", v); //$NON-NLS-1$
+ super.executeTargets(project, targetNames);
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.tools.ant.Executor#getSubProjectExecutor()
+ */
+ public Executor getSubProjectExecutor() {
+ return this;
+ }
+}
diff --git a/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/ExecutorSetter.java b/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/ExecutorSetter.java
new file mode 100644
index 000000000..ed9aba55f
--- /dev/null
+++ b/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/ExecutorSetter.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * 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
+ *******************************************************************************/
+package org.eclipse.ant.internal.launching.remote;
+
+import org.apache.tools.ant.Executor;
+import org.apache.tools.ant.Project;
+
+/**
+ * This class exists so that the Ant integration has backwards compatibility
+ * with Ant releases previous to 1.6.3. Executors are a new feature of Ant 1.6.3.
+ */
+public class ExecutorSetter {
+
+ protected void setExecutor(Project project) {
+ Executor executor= new EclipseDefaultExecutor();
+ project.setExecutor(executor);
+ }
+}
diff --git a/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/InputHandlerSetter.java b/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/InputHandlerSetter.java
new file mode 100644
index 000000000..21bdd1f30
--- /dev/null
+++ b/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/InputHandlerSetter.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * 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.launching.remote;
+
+
+import java.text.MessageFormat; // can't use ICU, used by ant
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.input.DefaultInputHandler;
+import org.apache.tools.ant.input.InputHandler;
+
+/**
+ * This class exists so that the Ant integration has backwards compatibility
+ * with Ant releases previous to 1.5. InputHandlers are a new feature of Ant 1.5.
+ */
+class InputHandlerSetter {
+
+ protected void setInputHandler(Project project, String inputHandlerClassname) {
+ InputHandler handler = null;
+ if (inputHandlerClassname == null) {
+ handler = new DefaultInputHandler();
+ } else {
+ try {
+ handler = (InputHandler)(Class.forName(inputHandlerClassname).newInstance());
+ } catch (ClassCastException e) {
+ String msg = MessageFormat.format(RemoteAntMessages.getString("InternalAntRunner.The_specified_input_handler_class_{0}_does_not_implement_the_org.apache.tools.ant.input.InputHandler_interface_5"), new String[]{inputHandlerClassname}); //$NON-NLS-1$
+ throw new BuildException(msg, e);
+ } catch (Exception e) {
+ String msg = MessageFormat.format(RemoteAntMessages.getString("InternalAntRunner.Unable_to_instantiate_specified_input_handler_class_{0}___{1}_6"), new String[]{inputHandlerClassname, e.getClass().getName()}); //$NON-NLS-1$
+ throw new BuildException(msg, e);
+ }
+ }
+ project.setInputHandler(handler);
+ }
+}
diff --git a/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/RemoteAntMessages.java b/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/RemoteAntMessages.java
new file mode 100644
index 000000000..5cb927eb4
--- /dev/null
+++ b/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/RemoteAntMessages.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * 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.launching.remote;
+
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+public class RemoteAntMessages {
+
+ private static final String BUNDLE_NAME = "org.eclipse.ant.internal.launching.remote.RemoteAntMessages"; //$NON-NLS-1$
+
+ private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME);
+
+ private RemoteAntMessages() {
+ }
+
+ public static String getString(String key) {
+ try {
+ return RESOURCE_BUNDLE.getString(key);
+ } catch (MissingResourceException e) {
+ return '!' + key + '!';
+ }
+ }
+}
diff --git a/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/RemoteAntMessages.properties b/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/RemoteAntMessages.properties
new file mode 100644
index 000000000..a0c733232
--- /dev/null
+++ b/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/RemoteAntMessages.properties
@@ -0,0 +1,76 @@
+###############################################################################
+# 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
+###############################################################################
+
+InternalAntRunner.Build_file__{0}_1=Buildfile: {0}
+InternalAntRunner.Arguments__{0}_2=Arguments: {0}
+InternalAntRunner.Default_target__3=Default target:
+InternalAntRunner.Main_targets__4=Main targets:
+InternalAntRunner.Subtargets__5=Subtargets:
+InternalAntRunner.Unable_to_instantiate_logger__{0}_6=Unable to instantiate logger: {0}
+InternalAntRunner.Could_not_load_the_version_information._{0}_9=Could not load the version information. {0}
+InternalAntRunner.Could_not_load_the_version_information._10=Could not load the version information.
+InternalAntRunner.options_13=options
+InternalAntRunner.target_15=target
+InternalAntRunner.Options___21=Options:
+InternalAntRunner.print_this_message_23=print this message
+InternalAntRunner.print_project_help_information_25=print project help information
+InternalAntRunner.print_the_version_information_and_exit_27=print the version information and exit
+InternalAntRunner.be_extra_quiet_29=be extra quiet
+InternalAntRunner.be_extra_verbose_31=be extra verbose
+InternalAntRunner.print_debugging_information_33=print debugging information
+InternalAntRunner.produce_logging_information_without_adornments_35=produce logging information without adornments
+InternalAntRunner.use_given_file_for_log_37=use given file for log
+InternalAntRunner.the_class_which_is_to_perform_logging_39=the class which is to perform logging
+InternalAntRunner.add_an_instance_of_class_as_a_project_listener_41=add an instance of class as a project listener
+InternalAntRunner.use_given_buildfile_43=use given buildfile
+InternalAntRunner.use_value_for_given_property_45=use value for given property
+InternalAntRunner.Using_{0}_file_as_build_log._1=Using {0} file as build log.
+InternalAntRunner.Could_not_write_to_the_specified_log_file__{0}._Make_sure_the_path_exists_and_you_have_write_permissions._2=Cannot write on the specified log file: {0}. Make sure the path exists and you have write permissions.
+InternalAntRunner.BUILD_SUCCESSFUL_1=BUILD SUCCESSFUL
+InternalAntRunner.Unknown_argument__{0}_2=Unknown argument: {0}
+InternalAntRunner.Buildfile__{0}_does_not_exist_!_1=Buildfile: {0} does not exist
+InternalAntRunner.{0}_which_was_specified_to_be_a_build_listener_is_not_an_instance_of_org.apache.tools.ant.BuildListener._1={0} which was specified to be a build listener is not an instance of org.apache.tools.ant.BuildListener.
+InternalAntRunner.{0}_which_was_specified_to_perform_logging_is_not_an_instance_of_org.apache.tools.ant.BuildLogger._2={0} which was specified to perform logging is not an instance of org.apache.tools.ant.BuildLogger.
+InternalAntRunner.You_must_specify_a_classname_when_using_the_-listener_argument_1=You must specify a classname when using the -listener argument
+InternalAntRunner.You_must_specify_a_log_file_when_using_the_-log_argument_3=You must specify a log file when using the -log argument
+InternalAntRunner.You_must_specify_a_buildfile_when_using_the_-buildfile_argument_4=You must specify a buildfile when using the -buildfile argument
+InternalAntRunner.12=print information that might be helpful to
+InternalAntRunner.13=\t\t\t\t\t\t\tdiagnose or report problems.
+InternalAntRunner.19=load all properties from file with -D
+InternalAntRunner.20=\t\t\t\t\t\t\tproperties taking precedence
+InternalAntRunner.22=the class which will handle input requests
+InternalAntRunner.1=\t\t\t\t\'
+InternalAntRunner.Only_one_logger_class_may_be_specified_1=Only one logger class may be specified
+InternalAntRunner.You_must_specify_a_classname_when_using_the_-inputhandler_argument_1=You must specify a classname when using the -inputhandler argument
+InternalAntRunner.Only_one_input_handler_class_may_be_specified._2=Only one input handler class may be specified.
+InternalAntRunner.You_must_specify_a_property_filename_when_using_the_-propertyfile_argument_3=You must specify a property filename when using the -propertyfile argument
+InternalAntRunner.Could_not_load_property_file_{0}__{1}_4=Could not load property file {0}: {1}
+InternalAntRunner.The_specified_input_handler_class_{0}_does_not_implement_the_org.apache.tools.ant.input.InputHandler_interface_5=The specified input handler class {0} does not implement the org.apache.tools.ant.input.InputHandler interface
+InternalAntRunner.Unable_to_instantiate_specified_input_handler_class_{0}___{1}_6=Unable to instantiate specified input handler class {0} : {1}
+InternalAntRunner.The_diagnositics_options_is_an_Ant_1.5.*_feature._Please_update_your_Ant_classpath_to_include_an_Ant_version_greater_than_this._4=The diagnostics options is an Ant 1.5.* feature. Please update your Ant classpath to include an Ant version greater than this.
+InternalAntRunner.Specifying_property_files_is_a_Ant_1.5.*_feature._Please_update_your_Ant_classpath._6=Specifying property files is a Ant 1.5.* feature. Please update your Ant classpath to include an Ant version greater than this.
+InternalAntRunner.ANT_HOME_must_be_set_to_use_Ant_diagnostics_2=ANT_HOME must be set to use Ant diagnostics
+InternalAntRunner.Buildfile__{0}_is_not_a_file_1=Buildfile: {0} is not a file
+InternalAntRunner.-find_not_supported=-find not supported.\nCan be emulated using Run As > Ant Build located\nin the Run > External Tools menu
+InternalAntRunner.157=-lib not supported\nConfigure the Ant runtime classpath using either the\nglobal Ant runtime classpath or the Ant runtime classpath\n for this particular build
+InternalAntRunner.158=\t\t\tdo not allow interactive input
+InternalAntRunner.159=\t\texecute all targets that do not depend
+InternalAntRunner.160=\t\t\t\t\t\ton failed target(s)
+InternalAntRunner.161=Class {0} not found for task {1}
+InternalAntRunner.162=Class {0} not found for type {1}
+
+RemoteAntBuildLogger.1=BUILD FAILED
+RemoteAntBuildLogger.Total_time=Total time:
+RemoteAntBuildLogger._minutes_2=\ minutes
+RemoteAntBuildLogger._minute_3=\ minute
+RemoteAntBuildLogger._seconds_4=\ seconds
+RemoteAntBuildLogger._second_5=\ second
+RemoteAntBuildLogger._milliseconds_6=\ milliseconds
diff --git a/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/inputhandler/FailInputHandler.java b/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/inputhandler/FailInputHandler.java
new file mode 100644
index 000000000..63341f448
--- /dev/null
+++ b/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/inputhandler/FailInputHandler.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * 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
+ *******************************************************************************/
+
+package org.eclipse.ant.internal.launching.remote.inputhandler;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+import org.apache.tools.ant.input.DefaultInputHandler;
+
+public class FailInputHandler extends DefaultInputHandler {
+
+ protected InputStream getInputStream() {
+ //ensure any attempts to read input fail
+ return new InputStream(){
+ public int read() throws IOException {
+ throw new IOException();
+ }
+ };
+ }
+}
diff --git a/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/logger/MessageIds.java b/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/logger/MessageIds.java
new file mode 100644
index 000000000..1c0741ab1
--- /dev/null
+++ b/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/logger/MessageIds.java
@@ -0,0 +1,21 @@
+/*******************************************************************************
+ * 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.internal.launching.remote.logger;
+
+
+public class MessageIds {
+
+ public final static String PROCESS_ID= "processID"; //$NON-NLS-1$
+ public final static String BUILD_CANCELLED= "cancelled"; //$NON-NLS-1$
+ //constants need to start greater than the Project.MSG_* constants
+ public final static String TASK= "6"; //$NON-NLS-1$
+ public final static String TARGET= "7"; //$NON-NLS-1$
+}
diff --git a/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/logger/RemoteAntBreakpoint.java b/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/logger/RemoteAntBreakpoint.java
new file mode 100644
index 000000000..f3715163c
--- /dev/null
+++ b/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/logger/RemoteAntBreakpoint.java
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * 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
+ *******************************************************************************/
+package org.eclipse.ant.internal.launching.remote.logger;
+
+import java.io.File;
+
+import org.eclipse.ant.internal.launching.debug.model.DebugMessageIds;
+
+public class RemoteAntBreakpoint {
+
+ private File fFile;
+ private int fLineNumber;
+ private String fFileName;
+
+ public RemoteAntBreakpoint(String breakpointRepresentation) {
+ String[] data= breakpointRepresentation.split(DebugMessageIds.MESSAGE_DELIMITER);
+ String fileName= data[1];
+ String lineNumber= data[2];
+ fFileName= fileName;
+ fFile= new File(fileName);
+ fLineNumber= Integer.parseInt(lineNumber);
+ }
+
+ public boolean isAt(String fileName, int lineNumber) {
+ return fLineNumber == lineNumber && fileName != null && fFile.equals(new File(fileName));
+ }
+
+ public String toMarshallString() {
+ StringBuffer buffer= new StringBuffer(DebugMessageIds.BREAKPOINT);
+ buffer.append(DebugMessageIds.MESSAGE_DELIMITER);
+ buffer.append(fFileName);
+ buffer.append(DebugMessageIds.MESSAGE_DELIMITER);
+ buffer.append(fLineNumber);
+ return buffer.toString();
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ public boolean equals(Object obj) {
+ if (!(obj instanceof RemoteAntBreakpoint)) {
+ return false;
+ }
+ RemoteAntBreakpoint other= (RemoteAntBreakpoint) obj;
+ return other.getLineNumber() == fLineNumber && other.getFile().equals(fFile);
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#hashCode()
+ */
+ public int hashCode() {
+ return fFileName.hashCode() + fLineNumber;
+ }
+
+ public int getLineNumber() {
+ return fLineNumber;
+ }
+
+ public String getFileName() {
+ return fFileName;
+ }
+
+ public File getFile() {
+ return fFile;
+ }
+}
diff --git a/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/AntCoreModelMessages.java b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/AntCoreModelMessages.java
new file mode 100644
index 000000000..fa78e74ea
--- /dev/null
+++ b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/AntCoreModelMessages.java
@@ -0,0 +1,25 @@
+/**********************************************************************
+ * 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 - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.ant.internal.launching;
+
+import org.eclipse.osgi.util.NLS;
+
+public class AntCoreModelMessages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.ant.internal.launching.launchConfigurations.AntCoreModelMessages";//$NON-NLS-1$
+
+ public static String AntUtil_6;
+ public static String AntUtil_7;
+ public static String AntUtil_2;
+
+ static {
+ // load message values from bundle file
+ NLS.initializeMessages(BUNDLE_NAME, AntCoreModelMessages.class);
+ }
+} \ No newline at end of file
diff --git a/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/AntCoreModelMessages.properties b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/AntCoreModelMessages.properties
new file mode 100644
index 000000000..6bad54fc4
--- /dev/null
+++ b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/AntCoreModelMessages.properties
@@ -0,0 +1,14 @@
+###############################################################################
+# 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
+###############################################################################
+
+AntUtil_6=Invalid property file entry: {0}
+AntUtil_7=Unable to generate Ant classpath
+AntUtil_2=Error reading launch configuration
diff --git a/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/AntLaunch.java b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/AntLaunch.java
new file mode 100644
index 000000000..81c4143df
--- /dev/null
+++ b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/AntLaunch.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 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.launching;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.Launch;
+import org.eclipse.debug.core.model.ISourceLocator;
+
+/**
+ * Stores link descriptors for Launch for further use of TaskLinkManager
+ */
+public class AntLaunch extends Launch {
+ List linkDescriptors;
+
+ public AntLaunch(ILaunchConfiguration launchConfiguration, String mode, ISourceLocator locator) {
+ super(launchConfiguration, mode, locator);
+ linkDescriptors = new ArrayList();
+ }
+
+ public void addLinkDescriptor(String line, String fileName, int lineNumber, int offset, int length) {
+ if (fileName!= null && fileName.trim().length() > 0) {
+ synchronized (linkDescriptors) {
+ linkDescriptors.add(new LinkDescriptor(line, fileName, lineNumber, offset, length));
+ }
+ }
+ }
+
+ public void removeLinkDescriptor(LinkDescriptor ld) {
+ synchronized (linkDescriptors) {
+ linkDescriptors.remove(ld);
+ }
+ }
+
+ public List getLinkDescriptors() {
+ synchronized (linkDescriptors) {
+ return new ArrayList(linkDescriptors);
+ }
+ }
+
+ public void clearLinkDescriptors() {
+ synchronized (linkDescriptors) {
+ linkDescriptors.clear();
+ }
+ }
+
+}
diff --git a/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/AntLaunchingPreferenceInitializer.java b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/AntLaunchingPreferenceInitializer.java
new file mode 100644
index 000000000..54d596434
--- /dev/null
+++ b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/AntLaunchingPreferenceInitializer.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * 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
+ *******************************************************************************/
+package org.eclipse.ant.internal.launching;
+
+import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
+import org.eclipse.core.runtime.preferences.DefaultScope;
+import org.eclipse.core.runtime.preferences.IEclipsePreferences;
+
+public class AntLaunchingPreferenceInitializer extends
+ AbstractPreferenceInitializer {
+
+ public AntLaunchingPreferenceInitializer() {
+ super();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @seeorg.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#
+ * initializeDefaultPreferences()
+ */
+ public void initializeDefaultPreferences() {
+
+ IEclipsePreferences node = new DefaultScope()
+ .getNode(AntLaunching.getUniqueIdentifier());
+ node.put(IAntLaunchingPreferenceConstants.ANT_COMMUNICATION_TIMEOUT,
+ "20000"); //$NON-NLS-1$
+ }
+}
diff --git a/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/IAntLaunchingPreferenceConstants.java b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/IAntLaunchingPreferenceConstants.java
new file mode 100644
index 000000000..9acd58136
--- /dev/null
+++ b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/IAntLaunchingPreferenceConstants.java
@@ -0,0 +1,23 @@
+/*******************************************************************************
+ * 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.launching;
+
+/**
+ * Constants used to identify user preferences.
+ */
+public interface IAntLaunchingPreferenceConstants {
+
+ /**
+ * int preference identifier constant which specifies the length of time to wait
+ * to connect with the socket that communicates with the separate JRE to capture the output
+ */
+ public static final String ANT_COMMUNICATION_TIMEOUT= "timeout"; //$NON-NLS-1$
+}
diff --git a/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/LinkDescriptor.java b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/LinkDescriptor.java
new file mode 100644
index 000000000..baba206cc
--- /dev/null
+++ b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/LinkDescriptor.java
@@ -0,0 +1,73 @@
+/*******************************************************************************
+ * Copyright (c) 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.launching;
+
+/**
+ * Stores detailed data of Link. Used to create linked messages.
+ */
+public class LinkDescriptor {
+ String line;
+ String fileName;
+ int lineNumber;
+ int offset;
+ int length;
+
+ public LinkDescriptor(String line, String fileName, int lineNumber,
+ int offset, int length) {
+ super();
+ this.line = line;
+ this.fileName = fileName;
+ this.lineNumber = lineNumber;
+ this.offset = offset;
+ this.length = length;
+ }
+
+ public String getLine() {
+ return line;
+ }
+
+ public void setLine(String line) {
+ this.line = line;
+ }
+
+ public String getFileName() {
+ return fileName;
+ }
+
+ public void setFileName(String fileName) {
+ this.fileName = fileName;
+ }
+
+ public int getLineNumber() {
+ return lineNumber;
+ }
+
+ public void setLineNumber(int lineNumber) {
+ this.lineNumber = lineNumber;
+ }
+
+ public int getOffset() {
+ return offset;
+ }
+
+ public void setOffset(int offset) {
+ this.offset = offset;
+ }
+
+ public int getLength() {
+ return length;
+ }
+
+ public void setLength(int length) {
+ this.length = length;
+ }
+
+}
diff --git a/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/AntDebugMessages.java b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/AntDebugMessages.java
new file mode 100644
index 000000000..396c1c44a
--- /dev/null
+++ b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/AntDebugMessages.java
@@ -0,0 +1,23 @@
+/**********************************************************************
+ * 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 - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.ant.internal.launching.debug;
+
+import org.eclipse.osgi.util.NLS;
+
+public class AntDebugMessages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.ant.internal.launching.debug.AntDebugMessages";//$NON-NLS-1$
+
+ public static String AntSourceContainer_0;
+
+ static {
+ // load message values from bundle file
+ NLS.initializeMessages(BUNDLE_NAME, AntDebugMessages.class);
+ }
+} \ No newline at end of file
diff --git a/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/AntDebugMessages.properties b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/AntDebugMessages.properties
new file mode 100644
index 000000000..78c11d981
--- /dev/null
+++ b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/AntDebugMessages.properties
@@ -0,0 +1,12 @@
+###############################################################################
+# 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
+###############################################################################
+
+AntSourceContainer_0=Ant Source Container \ No newline at end of file
diff --git a/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/AntSourceContainer.java b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/AntSourceContainer.java
new file mode 100644
index 000000000..579b66fc2
--- /dev/null
+++ b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/AntSourceContainer.java
@@ -0,0 +1,73 @@
+/*******************************************************************************
+ * 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
+ *******************************************************************************/
+
+package org.eclipse.ant.internal.launching.debug;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.debug.core.sourcelookup.ISourceContainerType;
+import org.eclipse.debug.core.sourcelookup.containers.AbstractSourceContainer;
+import org.eclipse.debug.core.sourcelookup.containers.LocalFileStorage;
+
+public class AntSourceContainer extends AbstractSourceContainer {
+
+ private IWorkspaceRoot fRoot;
+
+ public AntSourceContainer() {
+ fRoot = ResourcesPlugin.getWorkspace().getRoot();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.sourcelookup.ISourceContainer#findSourceElements(java.lang.String)
+ */
+ public Object[] findSourceElements(String path) throws CoreException {
+ ArrayList sources = new ArrayList();
+ File osFile = new File(path);
+ if (osFile.exists()) {
+ try {
+ IPath canonicalPath = new Path(osFile.getCanonicalPath());
+ IFile[] files = fRoot.findFilesForLocation(canonicalPath);
+ if (files.length > 0) {
+ for (int i = 0; i < files.length; i++) {
+ sources.add(files[i]);
+ }
+ } else {
+ sources.add(new LocalFileStorage(osFile));
+ }
+ } catch (IOException e) {
+ }
+ }
+ return sources.toArray();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.sourcelookup.ISourceContainer#getName()
+ */
+ public String getName() {
+ return AntDebugMessages.AntSourceContainer_0;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.sourcelookup.ISourceContainer#getType()
+ * Not persisted via the launch configuration
+ */
+ public ISourceContainerType getType() {
+ return null;
+ }
+} \ No newline at end of file
diff --git a/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/AntSourceLookupDirector.java b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/AntSourceLookupDirector.java
new file mode 100644
index 000000000..e0de3dd7d
--- /dev/null
+++ b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/AntSourceLookupDirector.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * 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
+ *******************************************************************************/
+package org.eclipse.ant.internal.launching.debug;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.sourcelookup.AbstractSourceLookupDirector;
+import org.eclipse.debug.core.sourcelookup.ISourceLookupParticipant;
+
+/**
+ * Ant source lookup director. For Ant source lookup there is one source
+ * lookup participant.
+ */
+public class AntSourceLookupDirector extends AbstractSourceLookupDirector {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.sourcelookup.ISourceLookupDirector#initializeParticipants()
+ */
+ public void initializeParticipants() {
+ addParticipants(new ISourceLookupParticipant[]{new AntSourceLookupParticipant()});
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.model.IPersistableSourceLocator#getMemento()
+ */
+ public String getMemento() throws CoreException {
+ return null;
+ }
+} \ No newline at end of file
diff --git a/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/AntSourceLookupParticipant.java b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/AntSourceLookupParticipant.java
new file mode 100644
index 000000000..73e040977
--- /dev/null
+++ b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/AntSourceLookupParticipant.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * 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
+ *******************************************************************************/
+package org.eclipse.ant.internal.launching.debug;
+
+import org.eclipse.ant.internal.launching.debug.model.AntStackFrame;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.sourcelookup.AbstractSourceLookupParticipant;
+
+/**
+ * The Ant source lookup participant knows how to translate a
+ * Ant stack frame into a source file name
+ */
+public class AntSourceLookupParticipant extends AbstractSourceLookupParticipant {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.sourcelookup.ISourceLookupParticipant#getSourceName(java.lang.Object)
+ */
+ public String getSourceName(Object object) throws CoreException {
+ if (object instanceof AntStackFrame) {
+ return ((AntStackFrame)object).getFilePath();
+ }
+ if (object instanceof String) {
+ // assume it's a file name
+ return (String)object;
+ }
+ return null;
+ }
+}
diff --git a/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/AntSourcePathComputerDelegate.java b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/AntSourcePathComputerDelegate.java
new file mode 100644
index 000000000..67e216f03
--- /dev/null
+++ b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/AntSourcePathComputerDelegate.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * 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
+ *******************************************************************************/
+package org.eclipse.ant.internal.launching.debug;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.sourcelookup.ISourceContainer;
+import org.eclipse.debug.core.sourcelookup.ISourcePathComputerDelegate;
+
+/**
+ * Computes the default source lookup path for an Ant launch configuration.
+ * The default source lookup is a container that knows how to map the
+ * fully qualified file system paths to either the <code>IFile</code> within the workspace or
+ * a <code>LocalFileStorage</code> for buildfiles not in the workspace.
+ */
+public class AntSourcePathComputerDelegate implements ISourcePathComputerDelegate {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.sourcelookup.ISourcePathComputerDelegate#computeSourceContainers(org.eclipse.debug.core.ILaunchConfiguration, org.eclipse.core.runtime.IProgressMonitor)
+ */
+ public ISourceContainer[] computeSourceContainers(ILaunchConfiguration configuration, IProgressMonitor monitor) throws CoreException {
+ return new ISourceContainer[] {new AntSourceContainer()};
+ }
+} \ No newline at end of file
diff --git a/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/IAntDebugConstants.java b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/IAntDebugConstants.java
new file mode 100644
index 000000000..c53e121a2
--- /dev/null
+++ b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/IAntDebugConstants.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * 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
+ *******************************************************************************/
+
+package org.eclipse.ant.internal.launching.debug;
+
+public interface IAntDebugConstants {
+
+ /**
+ * Unique identifier for the Ant debug model (value
+ * <code>org.eclipse.ant.ui.debug</code>).
+ */
+ public static final String ID_ANT_DEBUG_MODEL = "org.eclipse.ant.ui.debug"; //$NON-NLS-1$
+
+ /**
+ * Unique identifier for the Ant line breakpoint markers
+ * (value <code>org.eclipse.ant.ui.antLineBreakpointMarker</code>).
+ */
+ public static final String ID_ANT_LINE_BREAKPOINT_MARKER= "org.eclipse.ant.ui.antLineBreakpointMarker"; //$NON-NLS-1$
+
+ /**
+ * Unique identifier for the Ant run to line breakpoints
+ * (value <code>org.eclipse.ant.ui.runToLineBreakpoint</code>).
+ */
+ public static final String ANT_RUN_TO_LINE= "org.eclipse.ant.ui.runToLineBreakpoint"; //$NON-NLS-1$
+}
diff --git a/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/AntDebugElement.java b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/AntDebugElement.java
new file mode 100644
index 000000000..07a952802
--- /dev/null
+++ b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/AntDebugElement.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * 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
+ *******************************************************************************/
+package org.eclipse.ant.internal.launching.debug.model;
+
+
+import org.eclipse.ant.internal.launching.AntLaunching;
+import org.eclipse.ant.internal.launching.debug.IAntDebugConstants;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.debug.core.DebugException;
+import org.eclipse.debug.core.model.DebugElement;
+
+/**
+ * Common function of Ant debug model elements
+ */
+public abstract class AntDebugElement extends DebugElement {
+
+ /**
+ * Constructs a new debug element contained in the given
+ * debug target.
+ *
+ * @param target debug target
+ */
+ public AntDebugElement(AntDebugTarget target) {
+ super(target);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.model.IDebugElement#getModelIdentifier()
+ */
+ public String getModelIdentifier() {
+ return IAntDebugConstants.ID_ANT_DEBUG_MODEL;
+ }
+
+ /**
+ * Throws a debug exception with the given message, error code, and underlying
+ * exception.
+ */
+ protected void throwDebugException(String message) throws DebugException {
+ throw new DebugException(new Status(IStatus.ERROR, AntLaunching.getUniqueIdentifier(),
+ DebugException.TARGET_REQUEST_FAILED, message, null));
+ }
+
+ protected AntDebugTarget getAntDebugTarget() {
+ return (AntDebugTarget)super.getDebugTarget();
+ }
+}
diff --git a/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/AntLineBreakpoint.java b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/AntLineBreakpoint.java
new file mode 100644
index 000000000..2a96b5bd9
--- /dev/null
+++ b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/AntLineBreakpoint.java
@@ -0,0 +1,112 @@
+/*******************************************************************************
+ * 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
+ *******************************************************************************/
+package org.eclipse.ant.internal.launching.debug.model;
+
+import com.ibm.icu.text.MessageFormat;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.ant.internal.launching.debug.IAntDebugConstants;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspaceRunnable;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.debug.core.DebugException;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.model.IBreakpoint;
+import org.eclipse.debug.core.model.LineBreakpoint;
+
+/**
+ * Ant line breakpoint
+ */
+public class AntLineBreakpoint extends LineBreakpoint {
+
+ /**
+ * Default constructor is required for the breakpoint manager
+ * to re-create persisted breakpoints. After instantiating a breakpoint,
+ * the <code>setMarker(...)</code> method is called to restore
+ * this breakpoint's attributes.
+ */
+ public AntLineBreakpoint() {
+ }
+
+ /**
+ * Constructs a line breakpoint on the given resource at the given
+ * line number. The line number is 1-based (i.e. the first line of a
+ * file is line number 1).
+ *
+ * @param resource file on which to set the breakpoint
+ * @param lineNumber 1-based line number of the breakpoint
+ * @throws CoreException if unable to create the breakpoint
+ */
+ public AntLineBreakpoint(IResource resource, int lineNumber) throws CoreException {
+ this(resource, lineNumber, new HashMap(), true);
+ }
+
+ /**
+ * Constructs a line breakpoint on the given resource at the given
+ * line number. The line number is 1-based (i.e. the first line of a
+ * file is line number 1).
+ *
+ * @param resource file on which to set the breakpoint
+ * @param lineNumber 1-based line number of the breakpoint
+ * @param attributes the marker attributes to set
+ * @param register whether to add this breakpoint to the breakpoint manager
+ * @throws CoreException if unable to create the breakpoint
+ */
+ public AntLineBreakpoint(final IResource resource, final int lineNumber, final Map attributes, final boolean register) throws CoreException {
+ IWorkspaceRunnable wr= new IWorkspaceRunnable() {
+ public void run(IProgressMonitor monitor) throws CoreException {
+ IMarker marker = resource.createMarker(IAntDebugConstants.ID_ANT_LINE_BREAKPOINT_MARKER);
+ setMarker(marker);
+ attributes.put(IBreakpoint.ENABLED, Boolean.TRUE);
+ attributes.put(IMarker.LINE_NUMBER, new Integer(lineNumber));
+ attributes.put(IBreakpoint.ID, IAntDebugConstants.ID_ANT_DEBUG_MODEL);
+ attributes.put(IMarker.MESSAGE, MessageFormat.format(DebugModelMessages.AntLineBreakpoint_0, new String[] {Integer.toString(lineNumber)}));
+ ensureMarker().setAttributes(attributes);
+
+ register(register);
+ }
+ };
+ run(getMarkerRule(resource), wr);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.model.IBreakpoint#getModelIdentifier()
+ */
+ public String getModelIdentifier() {
+ return IAntDebugConstants.ID_ANT_DEBUG_MODEL;
+ }
+
+ /**
+ * @return whether this breakpoint is a run to line breakpoint
+ */
+ public boolean isRunToLine() {
+ try {
+ return ensureMarker().getAttribute(IAntDebugConstants.ANT_RUN_TO_LINE, false);
+ } catch (DebugException e) {
+ return false;
+ }
+ }
+
+ /**
+ * Add this breakpoint to the breakpoint manager,
+ * or sets it as unregistered.
+ */
+ private void register(boolean register) throws CoreException {
+ if (register) {
+ DebugPlugin.getDefault().getBreakpointManager().addBreakpoint(this);
+ } else {
+ setRegistered(false);
+ }
+ }
+}
diff --git a/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/AntProperties.java b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/AntProperties.java
new file mode 100644
index 000000000..4f93fec49
--- /dev/null
+++ b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/AntProperties.java
@@ -0,0 +1,109 @@
+/*******************************************************************************
+ * 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
+ *******************************************************************************/
+package org.eclipse.ant.internal.launching.debug.model;
+
+import org.eclipse.debug.core.DebugException;
+import org.eclipse.debug.core.model.IValue;
+import org.eclipse.debug.core.model.IVariable;
+
+public class AntProperties extends AntDebugElement implements IVariable {
+
+ private IValue fValue;
+ private String fName;
+ private boolean fValid= true;
+
+ public AntProperties(AntDebugTarget target, String name) {
+ super(target);
+ fName= name;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.model.IVariable#getValue()
+ */
+ public synchronized IValue getValue() throws DebugException {
+ int attempts= 0;
+ while (!fValid && !getDebugTarget().isTerminated()) {
+ try {
+ wait(50);
+ } catch (InterruptedException e) {
+ }
+ if (attempts == 20 && !fValid && !getDebugTarget().isTerminated()) {
+ throwDebugException(DebugModelMessages.AntProperties_1);
+ }
+ attempts++;
+ }
+ return fValue;
+ }
+
+ public IValue getLastValue() {
+ return fValue;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.model.IVariable#getName()
+ */
+ public String getName() {
+ return fName;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.model.IVariable#getReferenceTypeName()
+ */
+ public String getReferenceTypeName() {
+ return ""; //$NON-NLS-1$
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.model.IVariable#hasValueChanged()
+ */
+ public boolean hasValueChanged() {
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.model.IValueModification#setValue(java.lang.String)
+ */
+ public void setValue(String expression) {
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.model.IValueModification#setValue(org.eclipse.debug.core.model.IValue)
+ */
+ public void setValue(IValue value) {
+ fValue= value;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.model.IValueModification#supportsValueModification()
+ */
+ public boolean supportsValueModification() {
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.model.IValueModification#verifyValue(java.lang.String)
+ */
+ public boolean verifyValue(String expression) {
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.model.IValueModification#verifyValue(org.eclipse.debug.core.model.IValue)
+ */
+ public boolean verifyValue(IValue value) {
+ return false;
+ }
+
+ public synchronized void setValid(boolean valid) {
+ fValid= valid;
+ notifyAll();
+ }
+}
diff --git a/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/AntPropertiesValue.java b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/AntPropertiesValue.java
new file mode 100644
index 000000000..2ec303ce0
--- /dev/null
+++ b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/AntPropertiesValue.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * 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
+ * Brock Janiczak (brockj@tpg.com.au) - bug 154907
+ *******************************************************************************/
+package org.eclipse.ant.internal.launching.debug.model;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import org.eclipse.debug.core.model.IValue;
+import org.eclipse.debug.core.model.IVariable;
+
+public class AntPropertiesValue extends AntDebugElement implements IValue {
+
+ private List fProperties= new ArrayList();
+
+ public AntPropertiesValue(AntDebugTarget target) {
+ super(target);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.model.IValue#getReferenceTypeName()
+ */
+ public String getReferenceTypeName() {
+ return ""; //$NON-NLS-1$
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.model.IValue#getValueString()
+ */
+ public String getValueString() {
+ return ""; //$NON-NLS-1$
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.model.IValue#isAllocated()
+ */
+ public boolean isAllocated() {
+ return true;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.model.IValue#getVariables()
+ */
+ public IVariable[] getVariables() {
+ Collections.sort(fProperties);
+ return (IVariable[])fProperties.toArray(new IVariable[fProperties.size()]);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.model.IValue#hasVariables()
+ */
+ public boolean hasVariables() {
+ return true;
+ }
+
+ protected void addProperties(List properties) {
+ fProperties.addAll(properties);
+ }
+
+ public List getProperties() {
+ return fProperties;
+ }
+}
diff --git a/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/AntProperty.java b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/AntProperty.java
new file mode 100644
index 000000000..9a699da01
--- /dev/null
+++ b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/AntProperty.java
@@ -0,0 +1,121 @@
+/*******************************************************************************
+ * 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 154907
+ *******************************************************************************/
+package org.eclipse.ant.internal.launching.debug.model;
+
+import org.eclipse.debug.core.model.IValue;
+import org.eclipse.debug.core.model.IVariable;
+
+/**
+ * A property in an Ant build.
+ */
+public class AntProperty extends AntDebugElement implements IVariable, Comparable {
+
+ private String fName;
+ private AntValue fValue;
+ private String fLabel;
+
+ /**
+ * Constructs a variable associated with the debug target
+ * with the given name and value.
+ *
+ * @param target the debug target
+ * @param name property name
+ * @param value property value
+ */
+ public AntProperty(AntDebugTarget target, String name, String value) {
+ super(target);
+ fName = name;
+ fValue= new AntValue(target, value);
+ }
+
+ /*
+ * @see org.eclipse.debug.core.model.IVariable#getValue()
+ */
+ public IValue getValue() {
+ return fValue;
+ }
+
+ /*
+ * @see org.eclipse.debug.core.model.IVariable#getName()
+ */
+ public String getName() {
+ return fName;
+ }
+
+ /*
+ * @see org.eclipse.debug.core.model.IVariable#getReferenceTypeName()
+ */
+ public String getReferenceTypeName() {
+ return ""; //$NON-NLS-1$
+ }
+
+ /*
+ * @see org.eclipse.debug.core.model.IVariable#hasValueChanged()
+ */
+ public boolean hasValueChanged() {
+ return false;
+ }
+
+ /*
+ * @see org.eclipse.debug.core.model.IValueModification#setValue(java.lang.String)
+ */
+ public void setValue(String expression) {
+ }
+
+ /*
+ * @see org.eclipse.debug.core.model.IValueModification#setValue(org.eclipse.debug.core.model.IValue)
+ */
+ public void setValue(IValue value) {
+ }
+
+ /*
+ * @see org.eclipse.debug.core.model.IValueModification#supportsValueModification()
+ */
+ public boolean supportsValueModification() {
+ return false;
+ }
+
+ /*
+ * @see org.eclipse.debug.core.model.IValueModification#verifyValue(java.lang.String)
+ */
+ public boolean verifyValue(String expression) {
+ return false;
+ }
+
+ /*
+ * @see org.eclipse.debug.core.model.IValueModification#verifyValue(org.eclipse.debug.core.model.IValue)
+ */
+ public boolean verifyValue(IValue value) {
+ return false;
+ }
+
+ /**
+ * @return the text used to render this property
+ */
+ public String getText() {
+ if (fLabel == null) {
+ StringBuffer buffer= new StringBuffer(getName());
+ buffer.append("= "); //$NON-NLS-1$
+ buffer.append(fValue.getValueString());
+ fLabel= buffer.toString();
+ }
+ return fLabel;
+ }
+
+ /*
+ * @see java.lang.Comparable#compareTo(java.lang.Object)
+ */
+ public int compareTo(Object other) {
+ AntProperty otherProperty = (AntProperty) other;
+ return fName.compareToIgnoreCase(otherProperty.getName());
+ }
+}
diff --git a/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/AntStackFrame.java b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/AntStackFrame.java
new file mode 100644
index 000000000..a72a712c1
--- /dev/null
+++ b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/AntStackFrame.java
@@ -0,0 +1,314 @@
+/*******************************************************************************
+ * 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
+ *******************************************************************************/
+package org.eclipse.ant.internal.launching.debug.model;
+
+import org.eclipse.ant.internal.launching.AntLaunchingUtil;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.debug.core.DebugException;
+import org.eclipse.debug.core.model.IRegisterGroup;
+import org.eclipse.debug.core.model.IStackFrame;
+import org.eclipse.debug.core.model.IThread;
+import org.eclipse.debug.core.model.IVariable;
+
+/**
+ * Ant stack frame.
+ */
+public class AntStackFrame extends AntDebugElement implements IStackFrame {
+
+ private AntThread fThread;
+ private String fName;
+ private int fLineNumber;
+ private String fFilePath;
+ private int fId;
+ private String fFullPath;
+
+ /**
+ * Constructs a stack frame in the given thread with the given id.
+ *
+ * @param antThread
+ * @param id stack frame id (0 is the top of the stack)
+ */
+ public AntStackFrame(AntThread antThread, int id, String name, String fullPath, int lineNumber) {
+ super((AntDebugTarget) antThread.getDebugTarget());
+ fId = id;
+ fThread = antThread;
+ fLineNumber= lineNumber;
+ fName= name;
+ setFilePath(fullPath);
+ }
+
+ public void setId(int id) {
+ fId= id;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.model.IStackFrame#getThread()
+ */
+ public IThread getThread() {
+ return fThread;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.model.IStackFrame#getVariables()
+ */
+ public IVariable[] getVariables() throws DebugException {
+ return fThread.getVariables();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.model.IStackFrame#hasVariables()
+ */
+ public boolean hasVariables() {
+ return isSuspended();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.model.IStackFrame#getLineNumber()
+ */
+ public int getLineNumber() {
+ return fLineNumber;
+ }
+
+ public void setLineNumber(int lineNumber) {
+ fLineNumber= lineNumber;
+ }
+
+ public void setFilePath(String fullPath) {
+ fFullPath= fullPath;
+ IFile file= AntLaunchingUtil.getFileForLocation(fullPath, null);
+ if (file != null) {
+ fFilePath= file.getProjectRelativePath().toString();
+ } else {
+ fFilePath= new Path(fullPath).lastSegment();
+ }
+ }
+
+ public String getFilePath() {
+ return fFullPath;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.model.IStackFrame#getCharStart()
+ */
+ public int getCharStart() {
+ return -1;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.model.IStackFrame#getCharEnd()
+ */
+ public int getCharEnd() {
+ return -1;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.model.IStackFrame#getName()
+ */
+ public String getName() {
+ return fName;
+ }
+
+ public void setName(String name) {
+ fName= name;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.model.IStackFrame#getRegisterGroups()
+ */
+ public IRegisterGroup[] getRegisterGroups() {
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.model.IStackFrame#hasRegisterGroups()
+ */
+ public boolean hasRegisterGroups() {
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.model.IStep#canStepInto()
+ */
+ public boolean canStepInto() {
+ return getThread().canStepInto();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.model.IStep#canStepOver()
+ */
+ public boolean canStepOver() {
+ return getThread().canStepOver();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.model.IStep#canStepReturn()
+ */
+ public boolean canStepReturn() {
+ return getThread().canStepReturn();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.model.IStep#isStepping()
+ */
+ public boolean isStepping() {
+ return getThread().isStepping();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.model.IStep#stepInto()
+ */
+ public void stepInto() throws DebugException {
+ getThread().stepInto();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.model.IStep#stepOver()
+ */
+ public void stepOver() throws DebugException {
+ getThread().stepOver();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.model.IStep#stepReturn()
+ */
+ public void stepReturn() throws DebugException {
+ getThread().stepReturn();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.model.ISuspendResume#canResume()
+ */
+ public boolean canResume() {
+ return getThread().canResume();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.model.ISuspendResume#canSuspend()
+ */
+ public boolean canSuspend() {
+ return getThread().canSuspend();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.model.ISuspendResume#isSuspended()
+ */
+ public boolean isSuspended() {
+ return getThread().isSuspended();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.model.ISuspendResume#resume()
+ */
+ public void resume() throws DebugException {
+ getThread().resume();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.model.ISuspendResume#suspend()
+ */
+ public void suspend() throws DebugException {
+ getThread().suspend();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.model.ITerminate#canTerminate()
+ */
+ public boolean canTerminate() {
+ return getThread().canTerminate();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.model.ITerminate#isTerminated()
+ */
+ public boolean isTerminated() {
+ return getThread().isTerminated();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.model.ITerminate#terminate()
+ */
+ public void terminate() throws DebugException {
+ getThread().terminate();
+ }
+
+ /**
+ * Returns the name of the buildfile this stack frame is associated
+ * with.
+ *
+ * @return the name of the buildfile this stack frame is associated
+ * with
+ */
+ public String getSourceName() {
+ return fFilePath;
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ public boolean equals(Object obj) {
+ if (obj instanceof AntStackFrame) {
+ AntStackFrame sf = (AntStackFrame)obj;
+ if (getSourceName() != null) {
+ return getSourceName().equals(sf.getSourceName()) &&
+ sf.getLineNumber() == getLineNumber() &&
+ sf.fId == fId;
+ }
+ return sf.fId == fId;
+ }
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#hashCode()
+ */
+ public int hashCode() {
+ if (getSourceName() == null) {
+ return fId;
+ }
+ return getSourceName().hashCode() + fId;
+ }
+
+ /**
+ * Returns this stack frame's unique identifier within its thread
+ *
+ * @return this stack frame's unique identifier within its thread
+ */
+ protected int getIdentifier() {
+ return fId;
+ }
+
+ /**
+ * Returns the system, user or runtime property
+ * name, or <code>null</code> if unable to resolve a property with the name.
+ *
+ * @param propertyName the name of the variable to search for
+ * @return a property, or <code>null</code> if none
+ */
+ public AntProperty findProperty(String propertyName) {
+ try {
+ IVariable[] groups= getVariables();
+ for (int i = 0; i < groups.length; i++) {
+ AntProperties propertiesGrouping = (AntProperties) groups[i];
+ AntPropertiesValue value= (AntPropertiesValue) propertiesGrouping.getValue();
+ IVariable[] properties= value.getVariables();
+ for (int j = 0; j < properties.length; j++) {
+ AntProperty property = (AntProperty) properties[j];
+ if (property.getName().equals(propertyName)) {
+ return property;
+ }
+ }
+ }
+ } catch (DebugException e) {
+ }
+ return null;
+ }
+}
diff --git a/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/AntValue.java b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/AntValue.java
new file mode 100644
index 000000000..2285279be
--- /dev/null
+++ b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/AntValue.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * 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
+ *******************************************************************************/
+package org.eclipse.ant.internal.launching.debug.model;
+
+import org.eclipse.ant.internal.launching.debug.IAntDebugConstants;
+import org.eclipse.debug.core.model.IValue;
+import org.eclipse.debug.core.model.IVariable;
+
+public class AntValue extends AntDebugElement implements IValue {
+
+ private String fValueString;
+ protected static final IVariable[] EMPTY = new IVariable[0];
+
+ /**
+ * @param target
+ */
+ public AntValue(AntDebugTarget target, String value) {
+ super(target);
+ fValueString= value;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.model.IValue#getReferenceTypeName()
+ */
+ public String getReferenceTypeName() {
+ return ""; //$NON-NLS-1$
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.model.IValue#getValueString()
+ */
+ public String getValueString() {
+ return fValueString;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.model.IValue#isAllocated()
+ */
+ public boolean isAllocated() {
+ return true;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.model.IValue#getVariables()
+ */
+ public IVariable[] getVariables() {
+ return EMPTY;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.model.IValue#hasVariables()
+ */
+ public boolean hasVariables() {
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.model.IDebugElement#getModelIdentifier()
+ */
+ public String getModelIdentifier() {
+ return IAntDebugConstants.ID_ANT_DEBUG_MODEL;
+ }
+}
diff --git a/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/DebugMessageIds.java b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/DebugMessageIds.java
new file mode 100644
index 000000000..fcc8f3ed2
--- /dev/null
+++ b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/DebugMessageIds.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * 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
+ *******************************************************************************/
+package org.eclipse.ant.internal.launching.debug.model;
+
+
+public class DebugMessageIds {
+
+ public final static String MESSAGE_DELIMITER= ","; //$NON-NLS-1$
+
+ public final static String BUILD_STARTED= "build_started"; //$NON-NLS-1$
+ public final static String TARGET_STARTED= "target_started"; //$NON-NLS-1$
+ public final static String TARGET_FINISHED= "target_finished"; //$NON-NLS-1$
+ public final static String TASK_STARTED= "task_started"; //$NON-NLS-1$
+ public final static String TASK_FINISHED= "task_finished"; //$NON-NLS-1$
+
+ public final static String STEP= "step"; //$NON-NLS-1$
+ public final static String STEP_OVER= "step_over"; //$NON-NLS-1$
+ public final static String STEP_INTO= "step_into"; //$NON-NLS-1$
+
+ public final static String TERMINATE= "terminate"; //$NON-NLS-1$
+ public final static String TERMINATED= "terminated"; //$NON-NLS-1$
+ public final static String SUSPEND= "suspend"; //$NON-NLS-1$
+ public final static String SUSPENDED= "suspended"; //$NON-NLS-1$
+ public final static String RESUME= "resume"; //$NON-NLS-1$
+
+ public final static String STACK= "stack"; //$NON-NLS-1$
+
+ public final static String ADD_BREAKPOINT= "add"; //$NON-NLS-1$
+ public final static String REMOVE_BREAKPOINT= "remove"; //$NON-NLS-1$
+
+ public final static String CLIENT_REQUEST= "client"; //$NON-NLS-1$
+ public final static String BREAKPOINT= "breakpoint"; //$NON-NLS-1$
+
+ public final static String PROPERTIES= "prop"; //$NON-NLS-1$
+ public final static String PROPERTY_VALUE= "value"; //$NON-NLS-1$
+ public final static int PROPERTY_USER= 0;
+ public final static int PROPERTY_SYSTEM= 1;
+ public final static int PROPERTY_RUNTIME= 2;
+}
diff --git a/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/DebugModelMessages.java b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/DebugModelMessages.java
new file mode 100644
index 000000000..acadad642
--- /dev/null
+++ b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/DebugModelMessages.java
@@ -0,0 +1,32 @@
+/**********************************************************************
+ * 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.launching.debug.model;
+
+import org.eclipse.osgi.util.NLS;
+
+public class DebugModelMessages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.ant.internal.launching.debug.model.DebugModelMessages";//$NON-NLS-1$
+
+ public static String AntDebugTarget_0;
+
+ public static String AntLineBreakpoint_0;
+ public static String AntThread_0;
+ public static String AntThread_1;
+ public static String AntThread_2;
+ public static String AntThread_3;
+ public static String AntThread_4;
+
+ public static String AntProperties_1;
+
+ static {
+ // load message values from bundle file
+ NLS.initializeMessages(BUNDLE_NAME, DebugModelMessages.class);
+ }
+} \ No newline at end of file
diff --git a/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/DebugModelMessages.properties b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/DebugModelMessages.properties
new file mode 100644
index 000000000..31cf84398
--- /dev/null
+++ b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/DebugModelMessages.properties
@@ -0,0 +1,21 @@
+###############################################################################
+# 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
+###############################################################################
+
+AntDebugTarget_0=Ant Build
+
+AntLineBreakpoint_0=Ant breakpoint [line: {0}]
+AntThread_0=User Properties
+AntThread_1=System Properties
+AntThread_2=Runtime Properties
+AntThread_3=Request to retrieve Ant stack frames failed
+AntThread_4=Request to retrieve Ant properties failed
+
+AntProperties_1=Request to Ant properties value failed
diff --git a/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/AntClasspathProvider.java b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/AntClasspathProvider.java
new file mode 100644
index 000000000..e4f8b36cf
--- /dev/null
+++ b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/AntClasspathProvider.java
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * 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.launching.launchConfigurations;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
+import org.eclipse.jdt.launching.IRuntimeClasspathEntry;
+import org.eclipse.jdt.launching.JavaRuntime;
+import org.eclipse.jdt.launching.StandardClasspathProvider;
+
+public class AntClasspathProvider extends StandardClasspathProvider {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jdt.launching.IRuntimeClasspathProvider#computeUnresolvedClasspath(org.eclipse.debug.core.ILaunchConfiguration)
+ */
+ public IRuntimeClasspathEntry[] computeUnresolvedClasspath(ILaunchConfiguration configuration) throws CoreException {
+ boolean useDefault = configuration.getAttribute(IJavaLaunchConfigurationConstants.ATTR_DEFAULT_CLASSPATH, true);
+ if (useDefault) {
+ List rtes = new ArrayList(10);
+ IRuntimeClasspathEntry jreEntry = null;
+ try {
+ jreEntry = JavaRuntime.computeJREEntry(configuration);
+ } catch (CoreException e) {
+ // not a java project
+ }
+ if (jreEntry == null) {
+ jreEntry = JavaRuntime.newRuntimeContainerClasspathEntry(
+ JavaRuntime.newDefaultJREContainerPath(), IRuntimeClasspathEntry.STANDARD_CLASSES);
+ }
+ rtes.add(jreEntry);
+ rtes.add(new AntHomeClasspathEntry());
+ rtes.add(new ContributedClasspathEntriesEntry());
+ return (IRuntimeClasspathEntry[]) rtes.toArray(new IRuntimeClasspathEntry[rtes.size()]);
+ }
+ return super.computeUnresolvedClasspath(configuration);
+ }
+}
diff --git a/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/AntHomeClasspathEntry.java b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/AntHomeClasspathEntry.java
new file mode 100644
index 000000000..1a8a9bf7c
--- /dev/null
+++ b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/AntHomeClasspathEntry.java
@@ -0,0 +1,210 @@
+/*******************************************************************************
+ * 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.launching.launchConfigurations;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.ant.core.AntCorePlugin;
+import org.eclipse.ant.core.AntCorePreferences;
+import org.eclipse.ant.core.IAntClasspathEntry;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.jdt.internal.launching.AbstractRuntimeClasspathEntry;
+import org.eclipse.jdt.launching.IRuntimeClasspathEntry;
+import org.eclipse.jdt.launching.JavaRuntime;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+import com.ibm.icu.text.MessageFormat;
+
+/**
+ * A classpath entry that contains a set of archives for a particular
+ * ANT_HOME.
+ *
+ * @since 3.0
+ */
+public class AntHomeClasspathEntry extends AbstractRuntimeClasspathEntry {
+
+ public static final String TYPE_ID = "org.eclipse.ant.ui.classpathentry.antHome"; //$NON-NLS-1$
+
+ /**
+ * Local path on disk where Ant Home is located or <code>null</code>
+ * to indicate the use of the default Ant Home.
+ */
+ private String antHomeLocation = null;
+
+ /**
+ * Creates an AntHome entry for the default AntHome installation.
+ */
+ public AntHomeClasspathEntry() {
+ antHomeLocation = null;
+ }
+
+ /**
+ * Constructs an AntHome entry for the Ant installed at the specified
+ * root directory.
+ *
+ * @param antHome path in the local file system to an Ant installation
+ */
+ public AntHomeClasspathEntry(String antHome) {
+ antHomeLocation = antHome;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jdt.internal.launching.AbstractRuntimeClasspathEntry#buildMemento(org.w3c.dom.Document, org.w3c.dom.Element)
+ */
+ protected void buildMemento(Document document, Element memento) throws CoreException {
+ if (antHomeLocation == null) {
+ memento.setAttribute("default", "true"); //$NON-NLS-1$//$NON-NLS-2$
+ } else {
+ memento.setAttribute("antHome", new Path(antHomeLocation).toString()); //$NON-NLS-1$
+ }
+ }
+ /* (non-Javadoc)
+ * @see org.eclipse.jdt.internal.launching.IRuntimeClasspathEntry2#initializeFrom(org.w3c.dom.Element)
+ */
+ public void initializeFrom(Element memento) throws CoreException {
+ String antHome = memento.getAttribute("antHome"); //$NON-NLS-1$
+ if (antHome != null && (antHome.length() > 0)) {
+ IPath path = new Path(antHome);
+ antHomeLocation = path.toOSString();
+ } else {
+ antHomeLocation = null;
+ }
+ }
+ /* (non-Javadoc)
+ * @see org.eclipse.jdt.launching.IRuntimeClasspathEntry2#getTypeId()
+ */
+ public String getTypeId() {
+ return TYPE_ID;
+ }
+ /* (non-Javadoc)
+ * @see org.eclipse.jdt.launching.IRuntimeClasspathEntry2#getRuntimeClasspathEntries(org.eclipse.debug.core.ILaunchConfiguration)
+ */
+ public IRuntimeClasspathEntry[] getRuntimeClasspathEntries(ILaunchConfiguration configuration) throws CoreException {
+ List libs = new ArrayList(40);
+ AntCorePreferences preferences = AntCorePlugin.getPlugin().getPreferences();
+ if (antHomeLocation == null) {
+ IAntClasspathEntry[] entries = preferences.getAntHomeClasspathEntries();
+ for (int i = 0; i < entries.length; i++) {
+ IAntClasspathEntry entry = entries[i];
+ libs.add(JavaRuntime.newStringVariableClasspathEntry(entry.getLabel()));
+ }
+ } else {
+ File lib= resolveAntHome();
+ IPath libDir = new Path(antHomeLocation).append("lib"); //$NON-NLS-1$
+ String[] fileNames = lib.list();
+ for (int i = 0; i < fileNames.length; i++) {
+ String name = fileNames[i];
+ IPath path = new Path(name);
+ String fileExtension = path.getFileExtension();
+ if ("jar".equalsIgnoreCase(fileExtension)) { //$NON-NLS-1$
+ libs.add(JavaRuntime.newArchiveRuntimeClasspathEntry(libDir.append(path)));
+ }
+ }
+ }
+ return (IRuntimeClasspathEntry[]) libs.toArray(new IRuntimeClasspathEntry[libs.size()]);
+ }
+
+ public File resolveAntHome() throws CoreException {
+ if (antHomeLocation == null) { //using the default ant home
+ return null;
+ }
+ IPath libDir= new Path(antHomeLocation).append("lib"); //$NON-NLS-1$
+ File lib= libDir.toFile();
+ File parentDir= lib.getParentFile();
+ if (parentDir == null || !parentDir.exists()) {
+ abort(MessageFormat.format(AntLaunchConfigurationMessages.AntHomeClasspathEntry_10, new String[] {antHomeLocation}), null);
+ }
+ if (!lib.exists() || !lib.isDirectory()) {
+ abort(MessageFormat.format(AntLaunchConfigurationMessages.AntHomeClasspathEntry_11, new String[] {antHomeLocation}), null);
+ }
+ return lib;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jdt.launching.IRuntimeClasspathEntry2#getName()
+ */
+ public String getName() {
+ if (antHomeLocation == null) {
+ return AntLaunchConfigurationMessages.AntHomeClasspathEntry_8;
+ }
+ return MessageFormat.format(AntLaunchConfigurationMessages.AntHomeClasspathEntry_9, new String[]{antHomeLocation});
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jdt.launching.IRuntimeClasspathEntry#getType()
+ */
+ public int getType() {
+ return IRuntimeClasspathEntry.OTHER;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jdt.launching.IRuntimeClasspathEntry2#isComposite()
+ */
+ public boolean isComposite() {
+ return true;
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ public boolean equals(Object obj) {
+ return obj instanceof AntHomeClasspathEntry &&
+ equalsOrNull(antHomeLocation, ((AntHomeClasspathEntry)obj).antHomeLocation);
+ }
+
+ /**
+ * Return whether s1 is equivalent to s2.
+ *
+ * @param s1
+ * @param s2
+ * @return whether s1 is equivalent to s2
+ */
+ private boolean equalsOrNull(String s1, String s2) {
+ if (s1 == null || s2 == null) {
+ return s1 == s2;
+ }
+ return s1.equalsIgnoreCase(s2);
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#hashCode()
+ */
+ public int hashCode() {
+ return getClass().hashCode();
+ }
+
+ /**
+ * Sets the ant home to use.
+ *
+ * @param path path to toor of an ant home installation
+ */
+ public void setAntHome(String path) {
+ antHomeLocation = path;
+ }
+
+ /**
+ * Returns the ant home location
+ *
+ * @return path to root ant installation directory
+ */
+ public String getAntHome() {
+ if (antHomeLocation == null) {
+ return AntCorePlugin.getPlugin().getPreferences().getAntHome();
+ }
+ return antHomeLocation;
+ }
+}
diff --git a/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/AntJavaLaunchDelegate.java b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/AntJavaLaunchDelegate.java
new file mode 100644
index 000000000..ac08c65cf
--- /dev/null
+++ b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/AntJavaLaunchDelegate.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * 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.launching.launchConfigurations;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
+import org.eclipse.jdt.launching.JavaLaunchDelegate;
+
+/**
+ * Used by the AntLaunchDelegate for Ant builds in a separate VM
+ * The subclassing is needed to be able to launch an Ant build from a non-Java project
+ */
+public class AntJavaLaunchDelegate extends JavaLaunchDelegate {
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.model.ILaunchConfigurationDelegate2#preLaunchCheck(org.eclipse.debug.core.ILaunchConfiguration, java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
+ */
+ public boolean preLaunchCheck(ILaunchConfiguration configuration,String mode, IProgressMonitor monitor) throws CoreException {
+ try {
+ return super.preLaunchCheck(configuration, mode, monitor);
+ } catch (CoreException ce) {
+ //likely dealing with a non-Java project
+ }
+ //no need to check for breakpoints as always in run mode
+ return true;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jdt.launching.AbstractJavaLaunchConfigurationDelegate#getProgramArguments(org.eclipse.debug.core.ILaunchConfiguration)
+ */
+ public String getProgramArguments(ILaunchConfiguration configuration) throws CoreException {
+ try {
+ return super.getProgramArguments(configuration);
+ } catch (CoreException ce) {
+ }
+ return configuration.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, ""); //$NON-NLS-1$
+ }
+}
diff --git a/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/AntLaunchConfigurationMessages.java b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/AntLaunchConfigurationMessages.java
new file mode 100644
index 000000000..30c7df3b9
--- /dev/null
+++ b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/AntLaunchConfigurationMessages.java
@@ -0,0 +1,37 @@
+/**********************************************************************
+ * 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 - Initial API and implementation
+ * dakshinamurthy.karra@gmail.com - bug 165371
+ **********************************************************************/
+package org.eclipse.ant.internal.launching.launchConfigurations;
+
+import org.eclipse.osgi.util.NLS;
+
+public class AntLaunchConfigurationMessages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.ant.internal.launching.launchConfigurations.AntLaunchConfigurationMessages";//$NON-NLS-1$
+
+ public static String AntLaunchDelegate_Launching__0__1;
+ public static String AntLaunchDelegate_Running__0__2;
+ public static String AntLaunchDelegate_Build_In_Progress;
+ public static String AntLaunchDelegate_Failure;
+ public static String AntLaunchDelegate_22;
+ public static String AntLaunchDelegate_23;
+ public static String AntLaunchDelegate_28;
+
+ public static String AntHomeClasspathEntry_8;
+ public static String AntHomeClasspathEntry_9;
+ public static String AntHomeClasspathEntry_10;
+ public static String AntHomeClasspathEntry_11;
+
+ public static String ContributedClasspathEntriesEntry_1;
+
+ static {
+ // load message values from bundle file
+ NLS.initializeMessages(BUNDLE_NAME, AntLaunchConfigurationMessages.class);
+ }
+} \ No newline at end of file
diff --git a/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/AntLaunchConfigurationMessages.properties b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/AntLaunchConfigurationMessages.properties
new file mode 100644
index 000000000..e66165576
--- /dev/null
+++ b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/AntLaunchConfigurationMessages.properties
@@ -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
+# dakshinamurthy.karra@gmail.com - bug 165371
+###############################################################################
+
+AntLaunchDelegate_Launching__0__1=Launching {0}
+AntLaunchDelegate_Running__0__2=Running {0}
+AntLaunchDelegate_Build_In_Progress=Ant build {0} already in progress. Concurrent Ant builds are possible if you specify to build in a separate JRE.
+AntLaunchDelegate_Failure=Failure of Background Ant Build
+AntLaunchDelegate_22=&Do not show error dialog when Ant build fails
+AntLaunchDelegate_23=Ant Build Failed
+AntLaunchDelegate_28=Waiting for virtual machine to exit...
+
+AntHomeClasspathEntry_8=Ant Home (Default)
+AntHomeClasspathEntry_9=Ant Home ({0})
+AntHomeClasspathEntry_10=Ant Home {0} does not exist
+AntHomeClasspathEntry_11=Ant Home {0} does not contain a "lib" directory
+
+ContributedClasspathEntriesEntry_1=Additional Tasks & Support \ No newline at end of file
diff --git a/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/AntMigrationDelegate.java b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/AntMigrationDelegate.java
new file mode 100644
index 000000000..bd568321d
--- /dev/null
+++ b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/AntMigrationDelegate.java
@@ -0,0 +1,77 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 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.launching.launchConfigurations;
+
+import org.eclipse.ant.internal.launching.AntLaunchingUtil;
+import org.eclipse.core.externaltools.internal.IExternalToolConstants;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.variables.IStringVariableManager;
+import org.eclipse.core.variables.VariablesPlugin;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationMigrationDelegate;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+
+/**
+ * Delegate for migrating Ant launch configurations.
+ * The migration process involves a resource mapping being created such that launch configurations
+ * can be filtered from the launch configuration dialog based on resource availability.
+ *
+ * @since 3.2
+ */
+public class AntMigrationDelegate implements ILaunchConfigurationMigrationDelegate {
+
+ /**
+ * Method to get the file for the specified launch configuration that should be mapped to the launch configuration
+ *
+ * @param candidate the launch configuration that the file will be mapped to.
+ * @return the buildfile or <code>null</code> if not in the workspace
+ */
+ protected IFile getFileForCandidate(ILaunchConfiguration candidate) {
+ IFile file= null;
+ String expandedLocation= null;
+ String location= null;
+ IStringVariableManager manager = VariablesPlugin.getDefault().getStringVariableManager();
+ try {
+ location= candidate.getAttribute(IExternalToolConstants.ATTR_LOCATION, (String)null);
+ if (location != null) {
+ expandedLocation= manager.performStringSubstitution(location);
+ if (expandedLocation != null) {
+ file= AntLaunchingUtil.getFileForLocation(expandedLocation, null);
+ }
+ }
+ } catch (CoreException e) {
+ }
+ return file;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.ILaunchConfigurationMigrationDelegate#isCandidate()
+ */
+ public boolean isCandidate(ILaunchConfiguration candidate) throws CoreException {
+ IResource[] mappedResources = candidate.getMappedResources();
+ if (mappedResources != null && mappedResources.length > 0) {
+ return false;
+ }
+ return getFileForCandidate(candidate) != null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.ILaunchConfigurationMigrationDelegate#migrate(org.eclipse.debug.core.ILaunchConfiguration)
+ */
+ public void migrate(ILaunchConfiguration candidate) throws CoreException {
+ IFile file = getFileForCandidate(candidate);
+ ILaunchConfigurationWorkingCopy wc = candidate.getWorkingCopy();
+ wc.setMappedResources(new IResource[] {file});
+ wc.doSave();
+ }
+} \ No newline at end of file
diff --git a/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/AntStreamMonitor.java b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/AntStreamMonitor.java
new file mode 100644
index 000000000..cf6199f60
--- /dev/null
+++ b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/AntStreamMonitor.java
@@ -0,0 +1,83 @@
+/*******************************************************************************
+ * 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.launching.launchConfigurations;
+
+import org.eclipse.core.runtime.ListenerList;
+import org.eclipse.debug.core.IStreamListener;
+import org.eclipse.debug.core.model.IFlushableStreamMonitor;
+
+/**
+ * Stream monitor implementation for an Ant build process.
+ */
+public class AntStreamMonitor implements IFlushableStreamMonitor {
+
+ private StringBuffer fContents = new StringBuffer();
+ private ListenerList fListeners = new ListenerList(1);
+ private boolean fBuffered = true;
+
+ /**
+ * @see org.eclipse.debug.core.model.IStreamMonitor#addListener(org.eclipse.debug.core.IStreamListener)
+ */
+ public void addListener(IStreamListener listener) {
+ fListeners.add(listener);
+ }
+
+ /**
+ * @see org.eclipse.debug.core.model.IStreamMonitor#getContents()
+ */
+ public String getContents() {
+ return fContents.toString();
+ }
+
+ /**
+ * @see org.eclipse.debug.core.model.IStreamMonitor#removeListener(org.eclipse.debug.core.IStreamListener)
+ */
+ public void removeListener(IStreamListener listener) {
+ fListeners.remove(listener);
+ }
+
+ /**
+ * Appends the given message to this stream, and notifies listeners.
+ *
+ * @param message
+ */
+ public void append(String message) {
+ if (isBuffered()) {
+ fContents.append(message);
+ }
+ Object[] listeners = fListeners.getListeners();
+ for (int i = 0; i < listeners.length; i++) {
+ IStreamListener listener = (IStreamListener)listeners[i];
+ listener.streamAppended(message, this);
+ }
+ }
+ /**
+ * @see org.eclipse.debug.core.model.IFlushableStreamMonitor#flushContents()
+ */
+ public void flushContents() {
+ fContents.setLength(0);
+ }
+
+ /**
+ * @see org.eclipse.debug.core.model.IFlushableStreamMonitor#isBuffered()
+ */
+ public boolean isBuffered() {
+ return fBuffered;
+ }
+
+ /**
+ * @see org.eclipse.debug.core.model.IFlushableStreamMonitor#setBuffered(boolean)
+ */
+ public void setBuffered(boolean buffer) {
+ fBuffered = buffer;
+ }
+}
+
diff --git a/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/AntStreamsProxy.java b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/AntStreamsProxy.java
new file mode 100644
index 000000000..66a5e0986
--- /dev/null
+++ b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/AntStreamsProxy.java
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ * 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.launching.launchConfigurations;
+
+
+import org.eclipse.ant.internal.launching.AntLaunching;
+import org.eclipse.debug.core.model.IStreamMonitor;
+import org.eclipse.debug.core.model.IStreamsProxy;
+
+/**
+ *
+ */
+public class AntStreamsProxy implements IStreamsProxy {
+
+ private AntStreamMonitor fErrorMonitor = new AntStreamMonitor();
+ private AntStreamMonitor fOutputMonitor = new AntStreamMonitor();
+
+ public static final String ANT_DEBUG_STREAM = AntLaunching.PLUGIN_ID + ".ANT_DEBUG_STREAM"; //$NON-NLS-1$
+ public static final String ANT_VERBOSE_STREAM = AntLaunching.PLUGIN_ID + ".ANT_VERBOSE_STREAM"; //$NON-NLS-1$
+ public static final String ANT_WARNING_STREAM = AntLaunching.PLUGIN_ID + ".ANT_WARNING_STREAM"; //$NON-NLS-1$
+
+ private AntStreamMonitor fDebugMonitor = new AntStreamMonitor();
+ private AntStreamMonitor fVerboseMonitor = new AntStreamMonitor();
+ private AntStreamMonitor fWarningMonitor = new AntStreamMonitor();
+
+ /**
+ * @see org.eclipse.debug.core.model.IStreamsProxy#getErrorStreamMonitor()
+ */
+ public IStreamMonitor getErrorStreamMonitor() {
+ return fErrorMonitor;
+ }
+
+ /**
+ * @see org.eclipse.debug.core.model.IStreamsProxy#getOutputStreamMonitor()
+ */
+ public IStreamMonitor getOutputStreamMonitor() {
+ return fOutputMonitor;
+ }
+
+ /**
+ * @see org.eclipse.debug.core.model.IStreamsProxy#write(java.lang.String)
+ */
+ public void write(String input) {
+ }
+
+ public IStreamMonitor getWarningStreamMonitor() {
+ return fWarningMonitor;
+ }
+
+ public IStreamMonitor getDebugStreamMonitor() {
+ return fDebugMonitor;
+ }
+
+ public IStreamMonitor getVerboseStreamMonitor() {
+ return fVerboseMonitor;
+ }
+}
diff --git a/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/MessageIds.java b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/MessageIds.java
new file mode 100644
index 000000000..119e18af7
--- /dev/null
+++ b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/MessageIds.java
@@ -0,0 +1,21 @@
+/*******************************************************************************
+ * 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.ant.internal.launching.launchConfigurations;
+
+public class MessageIds {
+
+ public final static String PROCESS_ID= "processID"; //$NON-NLS-1$
+ public final static String BUILD_CANCELLED= "cancelled"; //$NON-NLS-1$
+ //constants need to start greater than the Project.MSG_* constants
+ public final static String TASK= "6"; //$NON-NLS-1$
+ public final static String TARGET= "7"; //$NON-NLS-1$
+}
diff --git a/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/RemoteAntProcessFactory.java b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/RemoteAntProcessFactory.java
new file mode 100644
index 000000000..013c13e05
--- /dev/null
+++ b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/RemoteAntProcessFactory.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * 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.launching.launchConfigurations;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.ant.launching.IAntLaunchConstants;
+import org.eclipse.debug.core.ILaunch;
+import org.eclipse.debug.core.IProcessFactory;
+import org.eclipse.debug.core.model.IProcess;
+
+public class RemoteAntProcessFactory implements IProcessFactory {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.IProcessFactory#newProcess(org.eclipse.debug.core.ILaunch, java.lang.Process, java.lang.String, java.util.Map)
+ */
+ public IProcess newProcess(ILaunch launch, Process process, String label, Map attributes) {
+ if (attributes == null) {
+ attributes= new HashMap(1);
+ }
+ attributes.put(IProcess.ATTR_PROCESS_TYPE, IAntLaunchConstants.ID_ANT_PROCESS_TYPE);
+ return new RemoteAntRuntimeProcess(launch, process, label, attributes);
+ }
+}
diff --git a/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/RemoteAntRuntimeProcess.java b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/RemoteAntRuntimeProcess.java
new file mode 100644
index 000000000..4a0bba2b1
--- /dev/null
+++ b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/RemoteAntRuntimeProcess.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * 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.launching.launchConfigurations;
+
+import java.util.Map;
+import org.eclipse.debug.core.ILaunch;
+import org.eclipse.debug.core.model.IStreamsProxy;
+import org.eclipse.debug.core.model.RuntimeProcess;
+
+public class RemoteAntRuntimeProcess extends RuntimeProcess {
+
+ /**
+ * Constructs a RuntimeProcess on the given system process
+ * with the given name, adding this process to the given
+ * launch.
+ * Sets the streams proxy to an AntStreamsProxy if output is captured.
+ */
+ public RemoteAntRuntimeProcess(ILaunch launch, Process process, String name, Map attributes) {
+ super(launch, process, name, attributes);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.model.RuntimeProcess#createStreamsProxy()
+ */
+ protected IStreamsProxy createStreamsProxy() {
+ return new AntStreamsProxy();
+ }
+}
diff --git a/ant/org.eclipse.ant.launching/src/org/eclipse/ant/launching/IAntLaunchConstants.java b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/launching/IAntLaunchConstants.java
new file mode 100644
index 000000000..ec8ae33bd
--- /dev/null
+++ b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/launching/IAntLaunchConstants.java
@@ -0,0 +1,126 @@
+/*******************************************************************************
+ * 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
+ *******************************************************************************/
+
+package org.eclipse.ant.launching;
+
+import org.eclipse.core.externaltools.internal.IExternalToolConstants;
+
+/**
+ * Constant definitions for Ant launch configurations.
+ *
+ * @since 1.0
+ * @noimplement This interface is not intended to be implemented by clients.
+ */
+public interface IAntLaunchConstants {
+
+ /**
+ * Ant launch configuration type identifier.
+ */
+ public static final String ID_ANT_LAUNCH_CONFIGURATION_TYPE = "org.eclipse.ant.AntLaunchConfigurationType"; //$NON-NLS-1$
+
+ public static final String MAIN_TYPE_NAME= "org.eclipse.ant.internal.launching.remote.InternalAntRunner"; //$NON-NLS-1$
+
+ /**
+ * Ant builder launch configuration type identifier. Ant project builders
+ * are of this type.
+ */
+ public static final String ID_ANT_BUILDER_LAUNCH_CONFIGURATION_TYPE = "org.eclipse.ant.AntBuilderLaunchConfigurationType"; //$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.
+ */
+ public static final String ATTR_ANT_TARGETS = IExternalToolConstants.UI_PLUGIN_ID + ".ATTR_ANT_TARGETS"; //$NON-NLS-1$
+
+ /**
+ * 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.
+ */
+ public static final String ATTR_ANT_AFTER_CLEAN_TARGETS = "org.eclipse.ant.ui.ATTR_ANT_AFTER_CLEAN_TARGETS"; //$NON-NLS-1$
+
+ /**
+ * 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.
+ */
+ public static final String ATTR_ANT_MANUAL_TARGETS = "org.eclipse.ant.ui.ATTR_ANT_MANUAL_TARGETS"; //$NON-NLS-1$
+
+ /**
+ * 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.
+ */
+ public static final String ATTR_ANT_AUTO_TARGETS = "org.eclipse.ant.ui.ATTR_ANT_AUTO_TARGETS"; //$NON-NLS-1$
+
+ /**
+ * 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.
+ */
+ public static final String ATTR_ANT_CLEAN_TARGETS = "org.eclipse.ant.ui.ATTR_ANT_CLEAN_TARGETS"; //$NON-NLS-1$
+
+ /**
+ * Boolean attribute indicating whether or not target specification for an
+ * Ant builder has been updated for 3.1
+ */
+ public static final String ATTR_TARGETS_UPDATED = "org.eclipse.ant.ui.ATTR_TARGETS_UPDATED"; //$NON-NLS-1$
+
+ /**
+ * 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 = IExternalToolConstants.UI_PLUGIN_ID + ".ATTR_ANT_PROPERTIES"; //$NON-NLS-1$
+
+ /**
+ * 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 = IExternalToolConstants.UI_PLUGIN_ID + ".ATTR_ANT_PROPERTY_FILES"; //$NON-NLS-1$
+
+ /**
+ * Boolean attribute indicating whether or not internal targets (targets
+ * with no description) should be hidden from the user in the launch
+ * configuration dialog. Default value is <code>false</code> which indicates
+ * that all targets will be displayed.
+ */
+ public static final String ATTR_HIDE_INTERNAL_TARGETS = IExternalToolConstants.UI_PLUGIN_ID + ".ATTR_HIDE_INTERNAL_TARGETS"; //$NON-NLS-1$
+
+ /**
+ * 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.
+ */
+ public static final String ATTR_SORT_TARGETS = IExternalToolConstants.UI_PLUGIN_ID + "ATTR_SORT_TARGETS"; //$NON-NLS-1$
+
+ /**
+ * Boolean attribute indicating if the default VM install should be used for
+ * the separate JRE build Default value is <code>false</code> for backwards
+ * compatibility
+ */
+ public static final String ATTR_DEFAULT_VM_INSTALL = "org.eclipse.ant.ui.DEFAULT_VM_INSTALL"; //$NON-NLS-1$
+
+ /**
+ * 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.
+ */
+ public static final String ID_ANT_PROCESS_TYPE = "org.eclipse.ant.ui.antProcess"; //$NON-NLS-1$
+
+}
diff --git a/ant/org.eclipse.ant.launching/src/org/eclipse/ant/launching/package.html b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/launching/package.html
new file mode 100644
index 000000000..55fd48456
--- /dev/null
+++ b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/launching/package.html
@@ -0,0 +1,13 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+ <title>Package-level Javadoc</title>
+</head>
+<body>
+Provides support for Ant launching.
+<h2>
+Package Specification</h2>
+This package defines constants for Ant launch configuration attributes.
+</body>
+</html>
diff --git a/ant/org.eclipse.ant.tests.core/.classpath b/ant/org.eclipse.ant.tests.core/.classpath
new file mode 100644
index 000000000..2ed1e9cd2
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.core/.classpath
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="test plugin"/>
+ <classpathentry kind="src" path="tests"/>
+ <classpathentry kind="src" output="test_support_bin" path="test support"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/ant/org.eclipse.ant.tests.core/.externalToolBuilders/Ant Test Support Lib Builder.launch b/ant/org.eclipse.ant.tests.core/.externalToolBuilders/Ant Test Support Lib Builder.launch
new file mode 100644
index 000000000..601d4a016
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.core/.externalToolBuilders/Ant Test Support Lib Builder.launch
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
+<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
+<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="true"/>
+<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,auto,clean"/>
+<booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/>
+<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
+<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
+<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_BUILD_SCOPE" value="${working_set:&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;launchConfigurationWorkingSet factoryID=&quot;org.eclipse.ui.internal.WorkingSetFactory&quot; name=&quot;workingSet&quot; editPageId=&quot;org.eclipse.ui.resourceWorkingSetPage&quot;&gt;&#10;&lt;item factoryID=&quot;org.eclipse.ui.internal.model.ResourceFactory&quot; path=&quot;/org.eclipse.ant.tests.core/test support/org&quot; type=&quot;2&quot;/&gt;&#10;&lt;item factoryID=&quot;org.eclipse.ui.internal.model.ResourceFactory&quot; path=&quot;/org.eclipse.ant.tests.core/buildfiles/buildAntTestsSupportJAR.xml&quot; type=&quot;1&quot;/&gt;&#10;&lt;/launchConfigurationWorkingSet&gt;&#10;}"/>
+<stringAttribute key="org.eclipse.ant.ui.ATTR_ANT_CLEAN_TARGETS" value="clean,"/>
+<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${working_set:&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;launchConfigurationWorkingSet factoryID=&quot;org.eclipse.ui.internal.WorkingSetFactory&quot; name=&quot;workingSet&quot; editPageId=&quot;org.eclipse.ui.resourceWorkingSetPage&quot;&gt;&#10;&lt;item factoryID=&quot;org.eclipse.ui.internal.model.ResourceFactory&quot; path=&quot;/org.eclipse.ant.tests.core&quot; type=&quot;4&quot;/&gt;&#10;&lt;/launchConfigurationWorkingSet&gt;&#10;}"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/org.eclipse.ant.tests.core/buildfiles/buildAntTestsSupportJAR.xml}"/>
+<booleanAttribute key="org.eclipse.debug.ui.ATTR_RUN_IN_BACKGROUND" value="false"/>
+</launchConfiguration>
diff --git a/ant/org.eclipse.ant.tests.core/.project b/ant/org.eclipse.ant.tests.core/.project
new file mode 100644
index 000000000..8d670cd7c
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.core/.project
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.ant.tests.core</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
+ <arguments>
+ <dictionary>
+ <key>LaunchConfigHandle</key>
+ <value>&lt;project&gt;/.externalToolBuilders/Ant Test Support Lib Builder.launch</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
diff --git a/ant/org.eclipse.ant.tests.core/.settings/org.eclipse.pde.core.prefs b/ant/org.eclipse.ant.tests.core/.settings/org.eclipse.pde.core.prefs
new file mode 100644
index 000000000..f01a37434
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.core/.settings/org.eclipse.pde.core.prefs
@@ -0,0 +1,3 @@
+#Thu May 27 14:48:43 PDT 2004
+eclipse.preferences.version=1
+selfhosting.binExcludes=/org.eclipse.ant.tests.core/test_support_bin
diff --git a/ant/org.eclipse.ant.tests.core/.settings/org.eclipse.pde.prefs b/ant/org.eclipse.ant.tests.core/.settings/org.eclipse.pde.prefs
new file mode 100644
index 000000000..b30771597
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.core/.settings/org.eclipse.pde.prefs
@@ -0,0 +1,29 @@
+#Mon Dec 14 11:40:48 CST 2009
+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=1
+compilers.incompatible-environment=1
+compilers.p.build=1
+compilers.p.build.missing.output=1
+compilers.p.deprecated=1
+compilers.p.discouraged-class=1
+compilers.p.illegal-att-value=0
+compilers.p.internal=1
+compilers.p.missing-packages=2
+compilers.p.missing-version-export-package=2
+compilers.p.missing-version-import-package=2
+compilers.p.missing-version-require-bundle=2
+compilers.p.no-required-att=0
+compilers.p.not-externalized-att=1
+compilers.p.unknown-attribute=0
+compilers.p.unknown-class=1
+compilers.p.unknown-element=0
+compilers.p.unknown-identifier=1
+compilers.p.unknown-resource=1
+compilers.p.unresolved-ex-points=0
+compilers.p.unresolved-import=0
+compilers.p.unused-element-or-attribute=1
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
+compilers.use-project=true
+eclipse.preferences.version=1
diff --git a/ant/org.eclipse.ant.tests.core/about.html b/ant/org.eclipse.ant.tests.core/about.html
new file mode 100644
index 000000000..460233046
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.core/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 2, 2006</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/ant/org.eclipse.ant.tests.core/build.properties b/ant/org.eclipse.ant.tests.core/build.properties
new file mode 100644
index 000000000..3d4cff0fe
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.core/build.properties
@@ -0,0 +1,28 @@
+###############################################################################
+# 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
+###############################################################################
+bin.includes = plugin.xml,\
+ plugin.properties,\
+ test.xml,\
+ about.html,\
+ testbuildfiles/,\
+ testresources/,\
+ testlib/,\
+ lib/,\
+ lib/*.jar,\
+ *.jar,\
+ META-INF/
+
+source.anttestscore.jar = test plugin/,\
+ tests/
+source.lib/antTestsSupport.jar = test support/
+jars.compile.order=anttestscore.jar,lib/antTestsSupport.jar
+output.lib/antTestsSupport.jar = test_support_bin/
+output.anttestscore.jar = bin/
diff --git a/ant/org.eclipse.ant.tests.core/buildfiles/buildAntTestsSupportJAR.xml b/ant/org.eclipse.ant.tests.core/buildfiles/buildAntTestsSupportJAR.xml
new file mode 100644
index 000000000..8b57ae736
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.core/buildfiles/buildAntTestsSupportJAR.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?> <!--
+ Copyright (c) 2005, 2006 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
+ -->
+
+<project name="build tests support jar" default="build" basedir="..">
+
+ <target name="build" description="Removes all build artifacts, recreates the support jar, and refreshes this plugin's resources" depends="clean, lib/antTestsSupport.jar"/>
+
+ <target name="init" depends="properties">
+ <property name="temp.folder" value="${basedir}/temp.folder"/>
+ <property name="plugin.destination" value="${basedir}"/>
+ <property name="build.result.folder" value="${basedir}"/>
+ </target>
+
+ <target name="properties" if="eclipse.running">
+ <property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
+ </target>
+
+ <target name="lib/antTestsSupport.jar" depends="init" description= "Builds the support JAR">
+ <property name="destdir" value="${temp.folder}/lib/antTestsSupport.jar.bin"/>
+ <delete dir="${destdir}"/>
+ <mkdir dir="${destdir}"/>
+ <!-- compile the source code -->
+ <javac target="1.1" destdir="${destdir}" failonerror="false" verbose="false" debug="on" includeAntRuntime="yes">
+ <classpath>
+ <dirset dir="${basedir}">
+ <include name="../org.eclipse.core.runtime/bin"/>
+ <include name="bin"/>
+ <include name="../org.eclipse.ant.core/bin"/>
+ </dirset>
+ <fileset dir="${eclipse.home}/plugins">
+ <include name="org.eclipse.core.runtime*.jar"/>
+ <include name="org.eclipse.equinox.common*.jar"/>
+ <include name="org.eclipse.ant.core*.jar"/>
+ </fileset>
+ </classpath>
+ <src path="test support/"/>
+ </javac>
+ <mkdir dir="${build.result.folder}/lib"/>
+ <jar destfile="${build.result.folder}/lib/antTestsSupport.jar" basedir="${destdir}"/>
+ <delete dir="${temp.folder}"/>
+ </target>
+
+ <target name="clean" depends="init">
+ <delete file="${build.result.folder}/lib/antTestsSupport.jar"/>
+ <delete dir="${temp.folder}"/>
+ </target>
+</project>
diff --git a/ant/org.eclipse.ant.tests.core/plugin.properties b/ant/org.eclipse.ant.tests.core/plugin.properties
new file mode 100644
index 000000000..f1e9e46e3
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.core/plugin.properties
@@ -0,0 +1,13 @@
+###############################################################################
+# Copyright (c) 2000, 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:
+# IBM Corporation - initial API and implementation
+###############################################################################
+
+pluginName=Ant Core Test Plugin
+providerName=Eclipse.org
diff --git a/ant/org.eclipse.ant.tests.core/plugin.xml b/ant/org.eclipse.ant.tests.core/plugin.xml
new file mode 100644
index 000000000..bdadd4a07
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.core/plugin.xml
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?> <!--
+ Copyright (c) 2005, 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:
+ IBM Corporation - initial API and implementation
+ -->
+
+<plugin>
+
+ <extension
+ point="org.eclipse.ant.core.extraClasspathEntries">
+ <extraClasspathEntry
+ library="lib/antTestsSupport.jar">
+ </extraClasspathEntry>
+ </extension>
+
+ <extension point="org.eclipse.ant.core.antTasks">
+ <antTask
+ name="coolTask"
+ class="org.eclipse.ant.tests.core.support.tasks.AntTestTask"
+ library="lib/antTestsSupport.jar"
+ headless="false">
+ </antTask>
+ <antTask
+ name="coolTask"
+ uri="testing"
+ class="org.eclipse.ant.tests.core.support.tasks.AntTestTask"
+ library="lib/antTestsSupport.jar"
+ headless="false">
+ </antTask>
+ </extension>
+
+ <extension point="org.eclipse.ant.core.antTypes">
+ <antType
+ name="coolType"
+ class="org.eclipse.ant.tests.core.support.types.AntTestPath"
+ library="lib/antTestsSupport.jar"
+ headless="false">
+ </antType>
+ <antType
+ name="coolType"
+ uri="testing"
+ class="org.eclipse.ant.tests.core.support.types.AntTestPath"
+ library="lib/antTestsSupport.jar"
+ headless="false">
+ </antType>
+ </extension>
+
+ <extension
+ point="org.eclipse.ant.core.antProperties">
+ <antProperty
+ name="property.testing"
+ value="true">
+ </antProperty>
+ <antProperty
+ name="property.testing2"
+ value="hey"
+ class= "org.eclipse.does.not.exist">
+ </antProperty>
+ <antProperty
+ name="property.testing3"
+ class= "org.eclipse.ant.tests.core.testplugin.AntTestPropertyValueProvider">
+ </antProperty>
+ <antProperty
+ name="property.headless"
+ value="headless"
+ headless= "false">
+ </antProperty>
+ </extension>
+
+</plugin>
diff --git a/ant/org.eclipse.ant.tests.core/test plugin/org/eclipse/ant/tests/core/testplugin/AntFileRunner.java b/ant/org.eclipse.ant.tests.core/test plugin/org/eclipse/ant/tests/core/testplugin/AntFileRunner.java
new file mode 100644
index 000000000..539e8026e
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.core/test plugin/org/eclipse/ant/tests/core/testplugin/AntFileRunner.java
@@ -0,0 +1,78 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 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:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.tests.core.testplugin;
+
+
+import org.eclipse.ant.core.AntRunner;
+import org.eclipse.ant.tests.core.AbstractAntTest;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+
+/**
+ * Responsible for running test ant build files.
+ */
+public class AntFileRunner {
+
+ private static final String BASE_DIR_PREFIX = "-Dbasedir="; //$NON-NLS-1$
+
+ public void run(IFile buildFile, String[] targets, String[] args, String baseDir, boolean captureOutput) throws CoreException {
+
+ AntRunner runner = new AntRunner();
+
+ String[] runnerArgs = args;
+
+ if (baseDir.length() > 0) {
+ // Ant requires the working directory to be specified
+ // as one of the arguments, so it needs to be appended.
+ int length = 1;
+ if (args != null) {
+ length = args.length + 1;
+ }
+
+ runnerArgs = new String[length];
+ if (args != null) {
+ System.arraycopy(args, 0, runnerArgs, 0, args.length);
+ }
+ runnerArgs[length - 1] = BASE_DIR_PREFIX + baseDir;
+ }
+ runner.setArguments(runnerArgs);
+
+ if (buildFile != null) {
+ runner.setBuildFileLocation(buildFile.getLocation().toFile().toString());
+ }
+ if (targets != null && targets.length > 0) {
+ runner.setExecutionTargets(targets);
+ }
+ if (captureOutput) {
+ runner.addBuildLogger(AbstractAntTest.ANT_TEST_BUILD_LOGGER);
+ }
+
+ runner.run(null);
+ }
+
+ public void run(String[] args, String baseDir) throws Exception {
+
+ AntRunner runner = new AntRunner();
+
+ String[] runnerArgs = args;
+
+ if (baseDir.length() > 0) {
+ // Ant requires the working directory to be specified
+ // as one of the arguments, so it needs to be appended.
+ runnerArgs = new String[args.length + 1];
+ System.arraycopy(args, 0, runnerArgs, 0, args.length);
+ runnerArgs[args.length] = BASE_DIR_PREFIX + baseDir;
+ }
+ runner.setArguments(runnerArgs);
+
+ runner.run(args);
+ }
+}
diff --git a/ant/org.eclipse.ant.tests.core/test plugin/org/eclipse/ant/tests/core/testplugin/AntTestChecker.java b/ant/org.eclipse.ant.tests.core/test plugin/org/eclipse/ant/tests/core/testplugin/AntTestChecker.java
new file mode 100644
index 000000000..1f449e531
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.core/test plugin/org/eclipse/ant/tests/core/testplugin/AntTestChecker.java
@@ -0,0 +1,229 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 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:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.tests.core.testplugin;
+
+
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.List;
+
+public class AntTestChecker {
+
+ private static AntTestChecker deflt= null;
+
+ private int taskStartedCount;
+
+ private int taskFinishedCount;
+
+ private int targetsStartedCount;
+
+ private int targetsFinishedCount;
+
+ private int buildsStartedCount;
+
+ private int buildsFinishedCount;
+
+ private List messages= new ArrayList();
+
+ private List targets= new ArrayList();
+
+ private List tasks= new ArrayList();
+
+ private List projects= new ArrayList();
+
+ private Hashtable userProperties;
+
+ private List nameOfListeners= new ArrayList();
+
+ private AntTestChecker() {
+ }
+
+ /**
+ * Returns the singleton AntTestChecker
+ */
+ public static AntTestChecker getDefault() {
+ if (deflt == null) {
+ deflt= new AntTestChecker();
+ }
+ return deflt;
+ }
+
+ /**
+ * Resets the singleton AntTestChecker
+ */
+ public static void reset() {
+ if (deflt != null) {
+ deflt.resetState();
+ }
+ }
+ /**
+ * @see org.apache.tools.ant.BuildListener#buildFinished(org.apache.tools.ant.BuildEvent)
+ */
+ public void buildFinished() {
+ buildsFinishedCount++;
+ }
+
+
+ public void buildStarted(String projectName) {
+ buildsStartedCount++;
+ projects.add(projectName);
+ }
+
+
+ public void messageLogged(String message) {
+ messages.add(message);
+ }
+
+ /**
+ * @see org.apache.tools.ant.BuildListener#targetFinished(org.apache.tools.ant.BuildEvent)
+ */
+ public void targetFinished() {
+ targetsFinishedCount++;
+ }
+
+ /**
+ * @see org.apache.tools.ant.BuildListener#targetStarted(org.apache.tools.ant.BuildEvent)
+ */
+ public void targetStarted(String targetName) {
+ targetsStartedCount++;
+ targets.add(targetName);
+ }
+
+ /**
+ * @see org.apache.tools.ant.BuildListener#taskFinished(org.apache.tools.ant.BuildEvent)
+ */
+ public void taskFinished() {
+ taskFinishedCount++;
+ }
+
+ /**
+ * @see org.apache.tools.ant.BuildListener#taskStarted(org.apache.tools.ant.BuildEvent)
+ */
+ public void taskStarted(String taskName) {
+ taskStartedCount++;
+ tasks.add(taskName);
+ }
+
+ /**
+ * Returns the buildsFinishedCount.
+ * @return int
+ */
+ public int getBuildsFinishedCount() {
+ return buildsFinishedCount;
+ }
+
+ /**
+ * Returns the buildsStartedCount.
+ * @return int
+ */
+ public int getBuildsStartedCount() {
+ return buildsStartedCount;
+ }
+
+ /**
+ * Returns the messagesLoggedCount.
+ * @return int
+ */
+ public int getMessagesLoggedCount() {
+ return messages.size();
+ }
+
+ /**
+ * Returns the targetsFinishedCount.
+ * @return int
+ */
+ public int getTargetsFinishedCount() {
+ return targetsFinishedCount;
+ }
+
+ /**
+ * Returns the targetsStartedCount.
+ * @return int
+ */
+ public int getTargetsStartedCount() {
+ return targetsStartedCount;
+ }
+
+ /**
+ * Returns the taskFinishedCount.
+ * @return int
+ */
+ public int getTaskFinishedCount() {
+ return taskFinishedCount;
+ }
+
+ /**
+ * Returns the taskStartedCount.
+ * @return int
+ */
+ public int getTaskStartedCount() {
+ return taskStartedCount;
+ }
+
+ protected void resetState() {
+ taskStartedCount= 0;
+ taskFinishedCount= 0;
+ targetsStartedCount= 0;
+ targetsFinishedCount= 0;
+ buildsStartedCount= 0;
+ buildsFinishedCount= 0;
+ messages= new ArrayList();
+ tasks= new ArrayList();
+ targets= new ArrayList();
+ projects= new ArrayList();
+ userProperties= null;
+ nameOfListeners= new ArrayList();
+ }
+
+ /**
+ * Return the message n from the last:
+ * e.g. getLoggedMessage(0) returns the most recent message
+ *
+ * @param n message index
+ * @return the nth last message
+ */
+ public String getLoggedMessage(int n) {
+ n = messages.size() - (n + 1);
+ if ((n < 0) || (n >= messages.size())) {
+ return null;
+ }
+ return (String) messages.get(n);
+ }
+
+ public String getLastMessageLogged() {
+ return getLoggedMessage(0);
+ }
+
+ public void setUserProperties(Hashtable userProperties) {
+ this.userProperties= userProperties;
+ }
+
+ public String getUserProperty(String name) {
+ return (String)userProperties.get(name);
+ }
+
+ public List getMessages() {
+ return messages;
+ }
+
+ public List getListeners() {
+ return nameOfListeners;
+ }
+
+ public String getLastListener() {
+ return (String)nameOfListeners.get(nameOfListeners.size() - 1);
+ }
+
+
+ public void addNameOfListener(String nameOfListener) {
+ this.nameOfListeners.add(nameOfListener);
+ }
+}
diff --git a/ant/org.eclipse.ant.tests.core/test plugin/org/eclipse/ant/tests/core/testplugin/AntTestPlugin.java b/ant/org.eclipse.ant.tests.core/test plugin/org/eclipse/ant/tests/core/testplugin/AntTestPlugin.java
new file mode 100644
index 000000000..3e5810328
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.core/test plugin/org/eclipse/ant/tests/core/testplugin/AntTestPlugin.java
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 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.tests.core.testplugin;
+
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URL;
+
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceDescription;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.Bundle;
+
+
+public class AntTestPlugin extends AbstractUIPlugin {
+
+ private static AntTestPlugin deflt;
+
+ public AntTestPlugin() {
+ super();
+ deflt= this;
+ }
+
+ public static AntTestPlugin getDefault() {
+ return deflt;
+ }
+
+ public static IWorkspace getWorkspace() {
+ return ResourcesPlugin.getWorkspace();
+ }
+
+ public static void enableAutobuild(boolean enable) throws CoreException {
+ // disable auto build
+ IWorkspace workspace= AntTestPlugin.getWorkspace();
+ IWorkspaceDescription desc= workspace.getDescription();
+ desc.setAutoBuilding(enable);
+ workspace.setDescription(desc);
+ }
+
+ public File getFileInPlugin(IPath path) {
+ try {
+ Bundle bundle = getDefault().getBundle();
+ URL installURL= new URL(bundle.getEntry("/"), path.toString());
+ URL localURL= FileLocator.toFileURL(installURL);
+ return new File(localURL.getFile());
+ } catch (IOException e) {
+ return null;
+ }
+ }
+}
diff --git a/ant/org.eclipse.ant.tests.core/test plugin/org/eclipse/ant/tests/core/testplugin/AntTestPropertyValueProvider.java b/ant/org.eclipse.ant.tests.core/test plugin/org/eclipse/ant/tests/core/testplugin/AntTestPropertyValueProvider.java
new file mode 100644
index 000000000..2786e964e
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.core/test plugin/org/eclipse/ant/tests/core/testplugin/AntTestPropertyValueProvider.java
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * Copyright (c) 2003, 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:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.tests.core.testplugin;
+
+import org.eclipse.ant.core.IAntPropertyValueProvider;
+
+public class AntTestPropertyValueProvider implements IAntPropertyValueProvider {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ant.core.IAntPropertyValueProvider#getAntPropertyValue(java.lang.String)
+ */
+ public String getAntPropertyValue(String antPropertyName) {
+ return "AntTestPropertyValueProvider";
+ }
+
+}
diff --git a/ant/org.eclipse.ant.tests.core/test plugin/org/eclipse/ant/tests/core/testplugin/ProjectHelper.java b/ant/org.eclipse.ant.tests.core/test plugin/org/eclipse/ant/tests/core/testplugin/ProjectHelper.java
new file mode 100644
index 000000000..4389ed7d7
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.core/test plugin/org/eclipse/ant/tests/core/testplugin/ProjectHelper.java
@@ -0,0 +1,114 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 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:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.tests.core.testplugin;
+
+
+import java.io.File;
+import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
+import java.util.*;
+
+import org.eclipse.core.resources.*;
+import org.eclipse.core.runtime.*;
+import org.eclipse.ui.dialogs.IOverwriteQuery;
+import org.eclipse.ui.wizards.datatransfer.*;
+
+/**
+ * Helper methods to set up an IProject.
+ */
+public class ProjectHelper {
+
+ public static final IPath TEST_BUILDFILES_DIR= new Path("testbuildfiles");
+ public static final IPath TEST_RESOURCES_DIR= new Path("testresources");
+ public static final IPath TEST_LIB_DIR= new Path("testlib");
+
+ /**
+ * Creates a IProject.
+ */
+ public static IProject createProject(String projectName) throws CoreException {
+ IWorkspaceRoot root= ResourcesPlugin.getWorkspace().getRoot();
+ IProject project= root.getProject(projectName);
+ if (!project.exists()) {
+ project.create(null);
+ } else {
+ project.refreshLocal(IResource.DEPTH_INFINITE, null);
+ }
+
+ if (!project.isOpen()) {
+ project.open(null);
+ }
+
+ return project;
+ }
+
+ /**
+ * Removes an IProject.
+ */
+ public static void delete(IProject project) throws CoreException {
+ project.delete(true, true, null);
+ }
+
+
+ /**
+ * Adds a folder to an IProject.
+ */
+ public static IFolder addFolder(IProject project, String containerName) throws CoreException {
+
+ IFolder folder= project.getFolder(containerName);
+ if (!folder.exists()) {
+ folder.create(false, true, null);
+ }
+
+ return folder;
+
+ }
+
+ public static void importFilesFromDirectory(File rootDir, IPath destPath, IProgressMonitor monitor) throws InvocationTargetException, IOException {
+ IImportStructureProvider structureProvider = FileSystemStructureProvider.INSTANCE;
+ List files = new ArrayList(100);
+ addFiles(rootDir, files);
+ try {
+ ImportOperation op= new ImportOperation(destPath, rootDir, structureProvider, new ImportOverwriteQuery(), files);
+ op.setCreateContainerStructure(false);
+ op.run(monitor);
+ } catch (InterruptedException e) {
+ // should not happen
+ }
+ }
+
+ private static void addFiles(File dir, List collection) throws IOException {
+ File[] files = dir.listFiles();
+ List subDirs = new ArrayList(2);
+ for (int i = 0; i < files.length; i++) {
+ if (files[i].isFile()) {
+ collection.add(files[i]);
+ } else if (files[i].isDirectory()) {
+ subDirs.add(files[i]);
+ }
+ }
+ Iterator iter = subDirs.iterator();
+ while (iter.hasNext()) {
+ File subDir = (File)iter.next();
+ addFiles(subDir, collection);
+ }
+ }
+
+ private static class ImportOverwriteQuery implements IOverwriteQuery {
+ public String queryOverwrite(String file) {
+ return ALL;
+ }
+ }
+
+ public static final String PROJECT_NAME = "AntTests";
+ public static final String BUILDFILES_FOLDER = "buildfiles";
+ public static final String RESOURCES_FOLDER = "resources";
+ public static final String LIB_FOLDER = "lib";
+}
diff --git a/ant/org.eclipse.ant.tests.core/test support/org/eclipse/ant/tests/core/support/inputHandlers/AntTestInputHandler.java b/ant/org.eclipse.ant.tests.core/test support/org/eclipse/ant/tests/core/support/inputHandlers/AntTestInputHandler.java
new file mode 100644
index 000000000..e6be8dcee
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.core/test support/org/eclipse/ant/tests/core/support/inputHandlers/AntTestInputHandler.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 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:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.tests.core.support.inputHandlers;
+
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.input.DefaultInputHandler;
+import org.apache.tools.ant.input.InputRequest;
+
+/**
+ * A test input handler when using Ant within Eclipse.
+ * This is the class that will respond to <input> requests from
+ * within an Ant build file.
+ * If the build is occurring in Ant 1.6.0 and the -noinput option has been specified
+ * this input handler will fail.
+ */
+public class AntTestInputHandler extends DefaultInputHandler {
+
+ /* (non-Javadoc)
+ * @see org.apache.tools.ant.input.InputHandler#handleInput(org.apache.tools.ant.input.InputRequest)
+ */
+ public void handleInput(InputRequest request) throws BuildException {
+ if (System.getProperty("eclipse.ant.noInput") != null) { //$NON-NLS-1$
+ throw new BuildException("Unable to respond to input request likely as a result of specifying the -noinput command");
+ }
+ request.setInput("testing handling input requests");
+ }
+}
diff --git a/ant/org.eclipse.ant.tests.core/test support/org/eclipse/ant/tests/core/support/tasks/AntTestTask.java b/ant/org.eclipse.ant.tests.core/test support/org/eclipse/ant/tests/core/support/tasks/AntTestTask.java
new file mode 100644
index 000000000..57372f0ab
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.core/test support/org/eclipse/ant/tests/core/support/tasks/AntTestTask.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 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:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.tests.core.support.tasks;
+
+
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Task;
+import org.apache.tools.ant.taskdefs.Echo;
+
+
+public class AntTestTask extends Task {
+
+ public AntTestTask() {
+ super();
+ }
+
+ /**
+ * @see org.apache.tools.ant.Task#execute()
+ */
+ public void execute() throws BuildException {
+ Echo echo= new Echo();
+ echo.setProject(getProject());
+ echo.setMessage("Testing Ant in Eclipse with a custom task");
+ echo.execute();
+ }
+}
diff --git a/ant/org.eclipse.ant.tests.core/test support/org/eclipse/ant/tests/core/support/tasks/AntTestTask2.java b/ant/org.eclipse.ant.tests.core/test support/org/eclipse/ant/tests/core/support/tasks/AntTestTask2.java
new file mode 100644
index 000000000..2f44be2e9
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.core/test support/org/eclipse/ant/tests/core/support/tasks/AntTestTask2.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2003, 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:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.tests.core.support.tasks;
+
+
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Task;
+import org.apache.tools.ant.taskdefs.Echo;
+
+
+public class AntTestTask2 extends Task {
+
+ public AntTestTask2() {
+ super();
+ }
+
+ /**
+ * @see org.apache.tools.ant.Task#execute()
+ */
+ public void execute() throws BuildException {
+ Echo echo= new Echo();
+ echo.setProject(getProject());
+ echo.setMessage("Testing Ant in Eclipse with a custom task");
+ echo.execute();
+ }
+}
diff --git a/ant/org.eclipse.ant.tests.core/test support/org/eclipse/ant/tests/core/support/testloggers/TestBuildListener.java b/ant/org.eclipse.ant.tests.core/test support/org/eclipse/ant/tests/core/support/testloggers/TestBuildListener.java
new file mode 100644
index 000000000..774488043
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.core/test support/org/eclipse/ant/tests/core/support/testloggers/TestBuildListener.java
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 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:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.tests.core.support.testloggers;
+
+
+import org.apache.tools.ant.BuildEvent;
+import org.apache.tools.ant.BuildListener;
+import org.eclipse.ant.tests.core.testplugin.AntTestChecker;
+
+
+public class TestBuildListener implements BuildListener {
+
+ /**
+ * @see org.apache.tools.ant.BuildListener#buildFinished(org.apache.tools.ant.BuildEvent)
+ */
+ public void buildFinished(BuildEvent event) {
+ }
+
+ /**
+ * @see org.apache.tools.ant.BuildListener#buildStarted(org.apache.tools.ant.BuildEvent)
+ */
+ public void buildStarted(BuildEvent event) {
+ AntTestChecker.getDefault().addNameOfListener(this.getClass().getName());
+ }
+
+ /**
+ * @see org.apache.tools.ant.BuildListener#messageLogged(org.apache.tools.ant.BuildEvent)
+ */
+ public void messageLogged(BuildEvent event) {
+ }
+
+ /**
+ * @see org.apache.tools.ant.BuildListener#targetFinished(org.apache.tools.ant.BuildEvent)
+ */
+ public void targetFinished(BuildEvent event) {
+ }
+
+ /**
+ * @see org.apache.tools.ant.BuildListener#targetStarted(org.apache.tools.ant.BuildEvent)
+ */
+ public void targetStarted(BuildEvent event) {
+ }
+
+ /**
+ * @see org.apache.tools.ant.BuildListener#taskFinished(org.apache.tools.ant.BuildEvent)
+ */
+ public void taskFinished(BuildEvent event) {
+ }
+
+ /**
+ * @see org.apache.tools.ant.BuildListener#taskStarted(org.apache.tools.ant.BuildEvent)
+ */
+ public void taskStarted(BuildEvent event) {
+ }
+
+}
diff --git a/ant/org.eclipse.ant.tests.core/test support/org/eclipse/ant/tests/core/support/testloggers/TestBuildLogger.java b/ant/org.eclipse.ant.tests.core/test support/org/eclipse/ant/tests/core/support/testloggers/TestBuildLogger.java
new file mode 100644
index 000000000..3b9d8aac1
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.core/test support/org/eclipse/ant/tests/core/support/testloggers/TestBuildLogger.java
@@ -0,0 +1,178 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 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:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.tests.core.support.testloggers;
+
+
+import java.io.PrintStream;
+
+import org.apache.tools.ant.BuildEvent;
+import org.apache.tools.ant.BuildLogger;
+import org.apache.tools.ant.Project;
+import org.eclipse.ant.core.AntSecurityException;
+import org.eclipse.ant.tests.core.testplugin.AntTestChecker;
+import org.eclipse.core.runtime.OperationCanceledException;
+
+public class TestBuildLogger implements BuildLogger {
+
+ private int fMessageOutputLevel= Project.MSG_INFO;
+ private PrintStream fErr= null;
+ private PrintStream fOut= null;
+ private boolean fSetProperties= true;
+
+ /**
+ * An exception that has already been logged.
+ */
+ private Throwable fHandledException= null;
+
+
+ public TestBuildLogger() {
+ }
+
+ /**
+ * @see org.apache.tools.ant.BuildLogger#setMessageOutputLevel(int)
+ */
+ public void setMessageOutputLevel(int level) {
+ fMessageOutputLevel= level;
+ }
+
+ protected int getMessageOutputLevel() {
+ return fMessageOutputLevel;
+ }
+
+ /**
+ * @see org.apache.tools.ant.BuildLogger#setEmacsMode(boolean)
+ */
+ public void setEmacsMode(boolean emacsMode) {
+ }
+
+ /**
+ * @see org.apache.tools.ant.BuildListener#buildStarted(org.apache.tools.ant.BuildEvent)
+ */
+ public void buildStarted(BuildEvent event) {
+ AntTestChecker.getDefault().buildStarted(event.getProject().getName());
+ }
+
+ /**
+ * @see org.apache.tools.ant.BuildListener#buildFinished(org.apache.tools.ant.BuildEvent)
+ */
+ public void buildFinished(BuildEvent event) {
+ handleException(event);
+ fHandledException= null;
+ AntTestChecker.getDefault().buildFinished();
+ }
+
+ /**
+ * @see org.apache.tools.ant.BuildListener#targetStarted(org.apache.tools.ant.BuildEvent)
+ */
+ public void targetStarted(BuildEvent event) {
+ AntTestChecker.getDefault().targetStarted(event.getTarget().getName());
+ if (fSetProperties) {
+ fSetProperties= false;
+ AntTestChecker.getDefault().setUserProperties(event.getProject().getProperties());
+ }
+ }
+
+ /**
+ * @see org.apache.tools.ant.BuildListener#targetFinished(org.apache.tools.ant.BuildEvent)
+ */
+ public void targetFinished(BuildEvent event) {
+ handleException(event);
+ AntTestChecker.getDefault().targetFinished();
+ }
+
+ /**
+ * @see org.apache.tools.ant.BuildListener#taskStarted(org.apache.tools.ant.BuildEvent)
+ */
+ public void taskStarted(BuildEvent event) {
+ AntTestChecker.getDefault().taskStarted(event.getTask().getTaskName());
+ }
+
+ /**
+ * @see org.apache.tools.ant.BuildListener#taskFinished(org.apache.tools.ant.BuildEvent)
+ */
+ public void taskFinished(BuildEvent event) {
+ handleException(event);
+ AntTestChecker.getDefault().targetFinished();
+ }
+
+ /**
+ * @see BuildListener#messageLogged(BuildEvent)
+ */
+ public void messageLogged(BuildEvent event) {
+ if (event.getPriority() > getMessageOutputLevel()) {
+ return;
+ }
+ logMessage(event.getMessage(), event.getPriority());
+ AntTestChecker.getDefault().messageLogged(event.getMessage());
+ }
+
+ protected PrintStream getErrorPrintStream() {
+ return fErr;
+ }
+
+ protected PrintStream getOutputPrintStream() {
+ return fOut;
+ }
+
+ /**
+ * @see org.apache.tools.ant.BuildLogger#setErrorPrintStream(java.io.PrintStream)
+ */
+ public void setErrorPrintStream(PrintStream err) {
+ //this build logger logs to "null" unless
+ //the user has explicitly set a logfile to use
+ if (err == System.err) {
+ fErr= null;
+ } else {
+ fErr= err;
+ }
+ }
+
+ /**
+ * @see org.apache.tools.ant.BuildLogger#setOutputPrintStream(java.io.PrintStream)
+ */
+ public void setOutputPrintStream(PrintStream output) {
+ //this build logger logs to "null" unless
+ //the user has explicitly set a logfile to use
+ if (output == System.out) {
+ fOut= null;
+ } else {
+ fOut= output;
+ }
+ }
+
+ protected void logMessage(String message, int priority) {
+ if (priority > getMessageOutputLevel()) {
+ return;
+ }
+
+ if (priority == Project.MSG_ERR) {
+ if (getErrorPrintStream() != null && getErrorPrintStream() != System.err) {
+ //user has designated to log to a logfile
+ getErrorPrintStream().println(message);
+ }
+ } else {
+ if (getOutputPrintStream() != null && getOutputPrintStream() != System.out) {
+ //user has designated to log to a logfile
+ getOutputPrintStream().println(message);
+ }
+ }
+ }
+
+ protected void handleException(BuildEvent event) {
+ Throwable exception = event.getException();
+ if (exception == null || exception == fHandledException
+ || exception instanceof OperationCanceledException
+ || exception instanceof AntSecurityException) {
+ return;
+ }
+ fHandledException= exception;
+ }
+}
diff --git a/ant/org.eclipse.ant.tests.core/test support/org/eclipse/ant/tests/core/support/types/AntTestPath.java b/ant/org.eclipse.ant.tests.core/test support/org/eclipse/ant/tests/core/support/types/AntTestPath.java
new file mode 100644
index 000000000..e5e9bf25a
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.core/test support/org/eclipse/ant/tests/core/support/types/AntTestPath.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 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:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.tests.core.support.types;
+
+
+
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.types.Path;
+
+public class AntTestPath extends Path {
+
+ String message;
+
+ public AntTestPath(Project project) {
+ super(project);
+ }
+
+ public void setMessage(String message) {
+ this.message= message;
+ }
+
+ public String getMessage() {
+ return message;
+ }
+
+}
diff --git a/ant/org.eclipse.ant.tests.core/test.xml b/ant/org.eclipse.ant.tests.core/test.xml
new file mode 100644
index 000000000..4f6daa5ae
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.core/test.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0"?>
+
+<project name="testsuite" default="run" basedir=".">
+ <!-- sets the properties eclipse-home, and library-file -->
+ <!-- The property ${eclipse-home} should be passed into this script -->
+ <!-- Set a meaningful default value for when it is not. -->
+ <property name="eclipse-home" value="${basedir}\..\.."/>
+<property name="plugin-name" value="org.eclipse.ant.tests.core"/>
+ <property name="library-file"
+ value="${eclipse-home}/plugins/org.eclipse.test/library.xml"/>
+
+ <!-- This target holds all initialization code that needs to be done for -->
+ <!-- all tests that are to be run. Initialization for individual tests -->
+ <!-- should be done within the body of the suite target. -->
+ <target name="init">
+ <tstamp/>
+ <delete>
+ <fileset dir="${eclipse-home}" includes="org*.xml"/>
+ </delete>
+ </target>
+
+ <!-- This target defines the tests that need to be run. -->
+ <target name="suite">
+ <property name="jdt-folder"
+ value="${eclipse-home}/jdt_folder"/>
+ <delete dir="${jdt-folder}" quiet="true"/>
+ <ant target="core-test" antfile="${library-file}" dir="${eclipse-home}">
+ <property name="data-dir" value="${jdt-folder}"/>
+ <property name="plugin-name" value="${plugin-name}"/>
+ <property name="classname"
+ value="org.eclipse.ant.tests.core.AutomatedSuite"/>
+ </ant>
+ </target>
+
+ <!-- This target holds code to cleanup the testing environment after -->
+ <!-- after all of the tests have been run. You can use this target to -->
+ <!-- delete temporary files that have been created. -->
+ <target name="cleanup">
+ </target>
+
+ <!-- This target runs the test suite. Any actions that need to happen -->
+ <!-- after all the tests have been run should go here. -->
+ <target name="run" depends="init,suite,cleanup">
+ <ant target="collect" antfile="${library-file}" dir="${eclipse-home}">
+ <property name="includes" value="org*.xml"/>
+ <property name="output-file" value="${plugin-name}.xml"/>
+ </ant>
+ </target>
+
+ <!-- This target runs the performance test suites. -->
+ <target name="performance">
+ </target>
+
+</project>
diff --git a/ant/org.eclipse.ant.tests.core/testbuildfiles/Bug32551.xml b/ant/org.eclipse.ant.tests.core/testbuildfiles/Bug32551.xml
new file mode 100644
index 000000000..e5439971c
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.core/testbuildfiles/Bug32551.xml
@@ -0,0 +1,15 @@
+<project name="bug" default="all">
+ <path id="myclasspath">
+ <fileset dir="..\lib">
+ <include name="antTestsSupport.jar" />
+ </fileset>
+ </path>
+
+ <taskdef name="hello" classname="org.eclipse.ant.tests.core.support.tasks.AntTestTask">
+ <classpath refid="myclasspath" />
+ </taskdef>
+
+ <target name="all">
+ <hello />
+ </target>
+ </project> \ No newline at end of file
diff --git a/ant/org.eclipse.ant.tests.core/testbuildfiles/Bug34663.xml b/ant/org.eclipse.ant.tests.core/testbuildfiles/Bug34663.xml
new file mode 100644
index 000000000..2479f907f
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.core/testbuildfiles/Bug34663.xml
@@ -0,0 +1,8 @@
+<project name="34663.xml" default="echoP">
+
+<taskdef file="${ROOTDIR}/taskdefs.properties" />
+
+ <target name="echoP">
+ <myEchoProperties/>
+ </target>
+</project> \ No newline at end of file
diff --git a/ant/org.eclipse.ant.tests.core/testbuildfiles/Bug42926.xml b/ant/org.eclipse.ant.tests.core/testbuildfiles/Bug42926.xml
new file mode 100644
index 000000000..3bb86a294
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.core/testbuildfiles/Bug42926.xml
@@ -0,0 +1,12 @@
+<project default="all">
+ <path id="someclasspath">
+ <fileset dir="${ant.home}/lib" includes="sometask.jar"/>
+ </path>
+
+ <taskdef name="sometask" classname="com.foo.SomeTask"
+classpathref="someclasspath"/>
+
+ <target name="all">
+ <echo>Hello ${ant.home}</echo>
+ </target>
+</project> \ No newline at end of file
diff --git a/ant/org.eclipse.ant.tests.core/testbuildfiles/Bug73602.xml b/ant/org.eclipse.ant.tests.core/testbuildfiles/Bug73602.xml
new file mode 100644
index 000000000..505a2bd67
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.core/testbuildfiles/Bug73602.xml
@@ -0,0 +1,13 @@
+<project name="main" default="all">
+ <taskdef resource="taskdefs.properties"/>
+ <hello/>
+ <target name="all">
+ <echo>Hello</echo>
+ </target>
+ <target name="all3">
+ <echo>Hello</echo>
+ </target>
+ <target name="all4">
+ <echo>Hello</echo>
+ </target>
+</project>
diff --git a/ant/org.eclipse.ant.tests.core/testbuildfiles/ClasspathOrdering.xml b/ant/org.eclipse.ant.tests.core/testbuildfiles/ClasspathOrdering.xml
new file mode 100644
index 000000000..c99b65e1e
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.core/testbuildfiles/ClasspathOrdering.xml
@@ -0,0 +1,6 @@
+<project name="ClasspathOrdering" default="ordered" basedir="..">
+
+ <target name="ordered">
+ <java classname= "ClasspathOrdering"/>
+ </target>
+</project>
diff --git a/ant/org.eclipse.ant.tests.core/testbuildfiles/CustomTask.xml b/ant/org.eclipse.ant.tests.core/testbuildfiles/CustomTask.xml
new file mode 100644
index 000000000..53525c8b0
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.core/testbuildfiles/CustomTask.xml
@@ -0,0 +1,13 @@
+<project name="Custom Task" default="Custom Task" basedir=".">
+ <target name="init">
+ <tstamp/>
+ </target>
+
+ <target name="Custom Task" description= "Test adding a custom task" depends="init">
+ <AntTestTask/>
+ </target>
+
+ <target name="Custom Task from Entry" description= "Test adding a custom task">
+ <AntTestTask2/>
+ </target>
+</project>
diff --git a/ant/org.eclipse.ant.tests.core/testbuildfiles/CustomType.xml b/ant/org.eclipse.ant.tests.core/testbuildfiles/CustomType.xml
new file mode 100644
index 000000000..1ae1ef5c3
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.core/testbuildfiles/CustomType.xml
@@ -0,0 +1,16 @@
+<project name="Custom Type" default="Custom Type" basedir=".">
+
+ <anttestpath id="compile.classpath">
+ <fileset dir="lib">
+ <include name="**/*.jar"/>
+ </fileset>
+ </anttestpath>
+
+ <target name="init">
+ <tstamp/>
+ </target>
+
+ <target name="Custom Type" description= "Test adding a custom type" depends="init">
+ <echo message="Test adding a custom type"/>
+ </target>
+</project>
diff --git a/ant/org.eclipse.ant.tests.core/testbuildfiles/ExtensionPointTask.xml b/ant/org.eclipse.ant.tests.core/testbuildfiles/ExtensionPointTask.xml
new file mode 100644
index 000000000..b8c6bb43d
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.core/testbuildfiles/ExtensionPointTask.xml
@@ -0,0 +1,16 @@
+<!--
+ Copyright (c) 2005, 2006 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
+ -->
+<project name="Extension Point Task" default="Extension Point Task" basedir=".">
+ <target name="Extension Point Task" description= "Ensure that an extension point defined task is present">
+ <coolTask/>
+ <my:coolTask xmlns:my="testing"/>
+ </target>
+</project>
diff --git a/ant/org.eclipse.ant.tests.core/testbuildfiles/ExtensionPointType.xml b/ant/org.eclipse.ant.tests.core/testbuildfiles/ExtensionPointType.xml
new file mode 100644
index 000000000..abaaaec76
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.core/testbuildfiles/ExtensionPointType.xml
@@ -0,0 +1,12 @@
+<project name="Extension Point Type" default="Extension Point Type" basedir=".">
+
+ <coolType id="compile.classpath">
+ <fileset dir="lib">
+ <include name="**/*.jar"/>
+ </fileset>
+ </coolType>
+
+ <target name="Extension Point Type" description= "Ensure that an extension point defined type is present">
+ <echo message="Ensure that an extension point defined type is present"/>
+ </target>
+</project>
diff --git a/ant/org.eclipse.ant.tests.core/testbuildfiles/NoDefault.xml b/ant/org.eclipse.ant.tests.core/testbuildfiles/NoDefault.xml
new file mode 100644
index 000000000..77c914a44
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.core/testbuildfiles/NoDefault.xml
@@ -0,0 +1,5 @@
+<project name= "Testing">
+ <target name= "test">
+ <echo message="testing"/>
+ </target>
+</project> \ No newline at end of file
diff --git a/ant/org.eclipse.ant.tests.core/testbuildfiles/TestForEcho.xml b/ant/org.eclipse.ant.tests.core/testbuildfiles/TestForEcho.xml
new file mode 100644
index 000000000..2213e5e5b
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.core/testbuildfiles/TestForEcho.xml
@@ -0,0 +1,11 @@
+<project name="Echo Test" default="Test for Echo" basedir=".">
+ <target name="init">
+ <tstamp/>
+ </target>
+
+ <target name="Test for Echo" description= "Calls other echos" depends="init">
+ <ant antfile="buildfiles/echoing.xml" dir="../../AntTests" target="echo1"/>
+ <ant antfile="buildfiles/echoing.xml" dir="../../AntTests" target="echo2"/>
+ <ant antfile="buildfiles/echoing.xml" dir="../../AntTests" target="echo3"/>
+ </target>
+</project>
diff --git a/ant/org.eclipse.ant.tests.core/testbuildfiles/build.xml b/ant/org.eclipse.ant.tests.core/testbuildfiles/build.xml
new file mode 100644
index 000000000..7638a536c
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.core/testbuildfiles/build.xml
@@ -0,0 +1,14 @@
+<project name="Eching" default="echo1" basedir="..">
+
+ <target name="echo1">
+ <echo message="echo1"/>
+ </target>
+
+ <target name="echo2">
+ <echo message="echo2"/>
+ </target>
+
+ <target name="echo3" description= "An echo3!">
+ <echo message="echo3"/>
+ </target>
+</project>
diff --git a/ant/org.eclipse.ant.tests.core/testbuildfiles/echoing.xml b/ant/org.eclipse.ant.tests.core/testbuildfiles/echoing.xml
new file mode 100644
index 000000000..5cdd64da7
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.core/testbuildfiles/echoing.xml
@@ -0,0 +1,14 @@
+<project name="Echoing" default="echo1" basedir="..">
+
+ <target name="echo1">
+ <echo message="echo1"/>
+ </target>
+
+ <target name="echo2">
+ <echo message="echo2"/>
+ </target>
+
+ <target name="echo3" description= "An echo3!">
+ <echo message="echo3"/>
+ </target>
+</project>
diff --git a/ant/org.eclipse.ant.tests.core/testbuildfiles/failingTarget.xml b/ant/org.eclipse.ant.tests.core/testbuildfiles/failingTarget.xml
new file mode 100644
index 000000000..04418e08a
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.core/testbuildfiles/failingTarget.xml
@@ -0,0 +1,9 @@
+<project default="all">
+ <target name="all" depends="fails, echos"/>
+ <target name="fails">
+ <jar jarfile="jar16.jar" basedir="doesNotExist"/>
+ </target>
+ <target name="echos">
+ <echo>Still echo on failure</echo>
+ </target>
+</project> \ No newline at end of file
diff --git a/ant/org.eclipse.ant.tests.core/testbuildfiles/input.xml b/ant/org.eclipse.ant.tests.core/testbuildfiles/input.xml
new file mode 100644
index 000000000..8d70ab5f4
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.core/testbuildfiles/input.xml
@@ -0,0 +1,7 @@
+<project name="input testing" default= "input test">
+ <target name="input test">
+ <input message="Enter for echo" addproperty= "inputTest">
+ </input>
+ <echo message="${inputTest}"/>
+ </target>
+</project> \ No newline at end of file
diff --git a/ant/org.eclipse.ant.tests.core/testbuildfiles/javac.xml b/ant/org.eclipse.ant.tests.core/testbuildfiles/javac.xml
new file mode 100644
index 000000000..42f022581
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.core/testbuildfiles/javac.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="org.eclipse.ant.core" default="build" basedir="..">
+
+
+ <target name="init" depends="properties">
+ <property name="plugin" value="AntTests"/>
+ <property name="temp.folder" value="${basedir}/temp.folder"/>
+ <property name="plugin.destination" value="${basedir}"/>
+ <property name="build.result.folder" value="${basedir}"/>
+ </target>
+
+ <target name="properties" if="use.eclipse.JDTCompiler">
+ <property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
+ </target>
+
+ <target name="build" depends="init">
+ <property name="destdir" value="${temp.folder}/javac.bin"/>
+ <delete dir="${temp.folder}/javac.bin"/>
+ <mkdir dir="${temp.folder}/javac.bin"/>
+ <!-- compile the source code -->
+ <javac destdir="${temp.folder}/javac.bin" failonerror="false" verbose="false" debug="on" includeAntRuntime="yes">
+ <src path="resources"/>
+ </javac>
+ </target>
+
+ <target name="clean" depends="init">
+ <delete dir="${temp.folder}"/>
+ </target>
+
+ <target name="refresh" depends="init" if="eclipse.running">
+ <eclipse.refreshLocal resource="${plugin}" depth="infinite"/>
+ </target>
+</project>
diff --git a/ant/org.eclipse.ant.tests.core/testlib/classpathOrdering1.jar b/ant/org.eclipse.ant.tests.core/testlib/classpathOrdering1.jar
new file mode 100644
index 000000000..b10cb7f6f
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.core/testlib/classpathOrdering1.jar
Binary files differ
diff --git a/ant/org.eclipse.ant.tests.core/testlib/classpathOrdering2.jar b/ant/org.eclipse.ant.tests.core/testlib/classpathOrdering2.jar
new file mode 100644
index 000000000..6816741ca
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.core/testlib/classpathOrdering2.jar
Binary files differ
diff --git a/ant/org.eclipse.ant.tests.core/testlib/taskFolder/org/eclipse/ant/tests/core/support/tasks/AntTestTask2.class b/ant/org.eclipse.ant.tests.core/testlib/taskFolder/org/eclipse/ant/tests/core/support/tasks/AntTestTask2.class
new file mode 100644
index 000000000..6a37eb55f
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.core/testlib/taskFolder/org/eclipse/ant/tests/core/support/tasks/AntTestTask2.class
Binary files differ
diff --git a/ant/org.eclipse.ant.tests.core/testresources/AntTestTask.java b/ant/org.eclipse.ant.tests.core/testresources/AntTestTask.java
new file mode 100644
index 000000000..4f3f09c18
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.core/testresources/AntTestTask.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 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:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Task;
+import org.apache.tools.ant.taskdefs.Echo;
+
+
+public class AntTestTask extends Task {
+
+ public AntTestTask() {
+ super();
+ }
+
+ /**
+ * @see org.apache.tools.ant.Task#execute()
+ */
+ public void execute() throws BuildException {
+ Echo echo= new Echo();
+ echo.setProject(getProject());
+ echo.setMessage("Testing Ant in Eclipse with a custom task");
+ echo.execute();
+ }
+}
diff --git a/ant/org.eclipse.ant.tests.core/testresources/taskdefs.properties b/ant/org.eclipse.ant.tests.core/testresources/taskdefs.properties
new file mode 100644
index 000000000..47fdd3a20
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.core/testresources/taskdefs.properties
@@ -0,0 +1,12 @@
+###############################################################################
+# 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:
+# IBM Corporation - initial API and implementation
+###############################################################################
+myEchoProperties=org.apache.tools.ant.taskdefs.optional.EchoProperties
+hello=org.eclipse.ant.tests.core.support.tasks.AntTestTask \ No newline at end of file
diff --git a/ant/org.eclipse.ant.tests.core/testresources/test.properties b/ant/org.eclipse.ant.tests.core/testresources/test.properties
new file mode 100644
index 000000000..8a043f84d
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.core/testresources/test.properties
@@ -0,0 +1,12 @@
+###############################################################################
+# Copyright (c) 2000, 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:
+# IBM Corporation - initial API and implementation
+###############################################################################
+AntTests=testing from properties file
+eclipse.is.cool=Yep
diff --git a/ant/org.eclipse.ant.tests.core/tests/org/eclipse/ant/tests/core/AbstractAntTest.java b/ant/org.eclipse.ant.tests.core/tests/org/eclipse/ant/tests/core/AbstractAntTest.java
new file mode 100644
index 000000000..be5f9c375
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.core/tests/org/eclipse/ant/tests/core/AbstractAntTest.java
@@ -0,0 +1,263 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 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:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.tests.core;
+
+
+import java.io.File;
+import java.util.List;
+
+import junit.framework.TestCase;
+
+import org.eclipse.ant.core.AntCorePlugin;
+import org.eclipse.ant.core.AntCorePreferences;
+import org.eclipse.ant.core.AntRunner;
+import org.eclipse.ant.core.IAntClasspathEntry;
+import org.eclipse.ant.core.Property;
+import org.eclipse.ant.core.TargetInfo;
+import org.eclipse.ant.core.Task;
+import org.eclipse.ant.core.Type;
+import org.eclipse.ant.tests.core.testplugin.AntFileRunner;
+import org.eclipse.ant.tests.core.testplugin.AntTestChecker;
+import org.eclipse.ant.tests.core.testplugin.AntTestPlugin;
+import org.eclipse.ant.tests.core.testplugin.ProjectHelper;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+
+/**
+ * Tests for Ant core
+ */
+public abstract class AbstractAntTest extends TestCase {
+
+ protected static final String BUILD_SUCCESSFUL= "BUILD SUCCESSFUL";
+ public static final String ANT_TEST_BUILD_LOGGER = "org.eclipse.ant.tests.core.support.testloggers.TestBuildLogger"; //$NON-NLS-1$
+ public static final String ANT_TEST_BUILD_LISTENER= "org.eclipse.ant.tests.core.support.testloggers.TestBuildListener";
+
+ /* (non-Javadoc)
+ * @see junit.framework.TestCase#setUp()
+ */
+ protected void setUp() throws Exception {
+ super.setUp();
+ assertProject();
+ }
+
+ /**
+ * Asserts that the test project has been created and all testing resources have been
+ * loaded each time the {@link #setUp()} method is called
+ * @throws Exception
+ * @since 3.5
+ */
+ protected void assertProject() throws Exception {
+ // delete any pre-existing project
+ IProject pro = ResourcesPlugin.getWorkspace().getRoot().getProject(ProjectHelper.PROJECT_NAME);
+ if (!pro.exists()) {
+ // create project and import build files and support files
+ IProject project = ProjectHelper.createProject(ProjectHelper.PROJECT_NAME);
+ IFolder folder = ProjectHelper.addFolder(project, ProjectHelper.BUILDFILES_FOLDER);
+ File root = AntTestPlugin.getDefault().getFileInPlugin(ProjectHelper.TEST_BUILDFILES_DIR);
+ ProjectHelper.importFilesFromDirectory(root, folder.getFullPath(), null);
+
+ folder = ProjectHelper.addFolder(project, ProjectHelper.RESOURCES_FOLDER);
+ root = AntTestPlugin.getDefault().getFileInPlugin(ProjectHelper.TEST_RESOURCES_DIR);
+ ProjectHelper.importFilesFromDirectory(root, folder.getFullPath(), null);
+
+ folder = ProjectHelper.addFolder(project, ProjectHelper.LIB_FOLDER);
+ root = AntTestPlugin.getDefault().getFileInPlugin(ProjectHelper.TEST_LIB_DIR);
+ ProjectHelper.importFilesFromDirectory(root, folder.getFullPath(), null);
+ }
+ }
+
+ /**
+ * Returns the 'AntTests' project.
+ *
+ * @return the test project
+ */
+ protected IProject getProject() {
+ return ResourcesPlugin.getWorkspace().getRoot().getProject(ProjectHelper.PROJECT_NAME);
+ }
+
+ public AbstractAntTest(String name) {
+ super(name);
+ }
+
+ protected IFile getBuildFile(String buildFileName) {
+ IFile file = getProject().getFolder(ProjectHelper.BUILDFILES_FOLDER).getFile(buildFileName);
+ assertTrue("Could not find build file named: " + buildFileName, file.exists());
+ return file;
+ }
+
+ protected IFolder getWorkingDirectory(String workingDirectoryName) {
+ IFolder folder = getProject().getFolder(workingDirectoryName);
+ assertTrue("Could not find the working directory named: " + workingDirectoryName, folder.exists());
+ return folder;
+ }
+
+ protected IFile checkFileExists(String fileName) throws CoreException {
+ getProject().refreshLocal(IResource.DEPTH_INFINITE, null);
+ IFile file = getProject().getFolder(ProjectHelper.BUILDFILES_FOLDER).getFile(fileName);
+ assertTrue("Could not find file named: " + fileName, file.exists());
+ return file;
+ }
+
+ public void run(String buildFileName) throws CoreException {
+ run(buildFileName, null, false);
+ }
+
+ public void run(String buildFileName, String[] args) throws CoreException {
+ run(buildFileName, args, false);
+ }
+
+ public void run(String buildFileName, String[] args, boolean retrieveTargets) throws CoreException {
+ run(buildFileName, args, retrieveTargets, "");
+ }
+
+ public void run(String buildFileName, String[] args, boolean retrieveTargets, String workingDir) throws CoreException {
+ AntTestChecker.reset();
+ IFile buildFile= null;
+ if (buildFileName != null) {
+ buildFile= getBuildFile(buildFileName);
+ }
+ AntFileRunner runner= new AntFileRunner();
+ String[] targets= null;
+ if (retrieveTargets) {
+ targets= getTargetNames(buildFileName);
+ }
+ if (workingDir.length() > 0) {
+ workingDir= getWorkingDirectory(workingDir).getLocation().toFile().getAbsolutePath();
+ }
+ runner.run(buildFile, targets, args, workingDir, true);
+ assertTrue("Build starts did not equal build finishes", AntTestChecker.getDefault().getBuildsStartedCount() == AntTestChecker.getDefault().getBuildsFinishedCount());
+ }
+
+ protected TargetInfo[] getTargets(String buildFileName) throws CoreException {
+ IFile buildFile= getBuildFile(buildFileName);
+
+ AntRunner runner = new AntRunner();
+ runner.setBuildFileLocation(buildFile.getLocation().toFile().getAbsolutePath());
+ return runner.getAvailableTargets();
+ }
+
+ protected String[] getTargetNames(String buildFileName) throws CoreException {
+ TargetInfo[] infos= getTargets(buildFileName);
+ String[] names= new String[infos.length];
+ for (int i = 0; i < infos.length; i++) {
+ TargetInfo info = infos[i];
+ names[i]= info.getName();
+ }
+ return names;
+ }
+
+ protected String[] getTargetDescriptions(String buildFileName) throws CoreException {
+ TargetInfo[] infos= getTargets(buildFileName);
+ String[] descriptions= new String[infos.length];
+ for (int i = 0; i < infos.length; i++) {
+ TargetInfo info = infos[i];
+ descriptions[i]= info.getDescription();
+ }
+ return descriptions;
+ }
+
+ /**
+ * Returns the name of the project containing the given target in the given build file or
+ * <code>null</code> if no project name can be found.
+ */
+ protected String getProjectName(String buildFileName, String targetName) throws CoreException {
+ TargetInfo info= getTarget(buildFileName, targetName);
+ if (info != null) {
+ return info.getProject().getName();
+ }
+ return null;
+ }
+
+ /**
+ * Returns the dependencies of the target with the given name in the given build file or <code>null</code>
+ * if no such target can be found.
+ */
+ protected String[] getDependencies(String buildFileName, String targetName) throws CoreException {
+ TargetInfo info= getTarget(buildFileName, targetName);
+ if (info != null) {
+ return info.getDependencies();
+ }
+ return null;
+ }
+
+ /**
+ * Returns the target with the given name in the given build file or <code>null</code>
+ * if no such target can be found.
+ */
+ protected TargetInfo getTarget(String buildFileName, String targetName) throws CoreException {
+ TargetInfo[] infos= getTargets(buildFileName);
+ for (int i= 0, numTargets= infos.length; i < numTargets; i++) {
+ if (infos[i].getName().equals(targetName)) {
+ return infos[i];
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Return the log message n from the last:
+ * e.g. getLoggedMessage(0) returns the most recent message
+ *
+ * @param n message index
+ * @return the nth last message
+ */
+ protected String getLoggedMessage(int n) {
+ return AntTestChecker.getDefault().getLoggedMessage(n);
+ }
+
+ protected String getLastMessageLogged() {
+ return getLoggedMessage(0);
+ }
+
+ protected void assertSuccessful() {
+ List messages= AntTestChecker.getDefault().getMessages();
+ String success= (String)messages.get(messages.size() - 1);
+ assertEquals("Build was not flagged as successful: " + success, BUILD_SUCCESSFUL, success);
+ }
+
+ protected String getPropertyFileName() {
+ return getProject().getFolder(ProjectHelper.RESOURCES_FOLDER).getFile("test.properties").getLocation().toFile().getAbsolutePath();
+ }
+
+ protected void restorePreferenceDefaults() {
+ AntCorePreferences prefs= AntCorePlugin.getPlugin().getPreferences();
+ IAntClasspathEntry toolsEntry= prefs.getToolsJarEntry();
+ IAntClasspathEntry[] additionalEntries;
+ if (toolsEntry == null) {
+ additionalEntries= new IAntClasspathEntry[]{};
+ } else {
+ additionalEntries= new IAntClasspathEntry[] {toolsEntry};
+ }
+ prefs.setAdditionalClasspathEntries(additionalEntries);
+ prefs.setAntHomeClasspathEntries(prefs.getDefaultAntHomeEntries());
+ prefs.setCustomTasks(new Task[]{});
+ prefs.setCustomTypes(new Type[]{});
+ prefs.setCustomPropertyFiles(new String[]{});
+ prefs.setCustomProperties(new Property[]{});
+ prefs.setAntHome(prefs.getDefaultAntHome());
+ }
+
+ protected String getAntHome() {
+ AntCorePreferences prefs= AntCorePlugin.getPlugin().getPreferences();
+ IAntClasspathEntry[] entries= prefs.getAntHomeClasspathEntries();
+ IAntClasspathEntry antjar= entries[0];
+ IPath antHomePath= new Path(antjar.getEntryURL().getFile());
+ antHomePath= antHomePath.removeLastSegments(1);
+ return antHomePath.toFile().getAbsolutePath();
+ }
+}
+
diff --git a/ant/org.eclipse.ant.tests.core/tests/org/eclipse/ant/tests/core/tests/ProjectTests.java b/ant/org.eclipse.ant.tests.core/tests/org/eclipse/ant/tests/core/tests/ProjectTests.java
new file mode 100644
index 000000000..c3694fafa
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.core/tests/org/eclipse/ant/tests/core/tests/ProjectTests.java
@@ -0,0 +1,77 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2007 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.tests.core.tests;
+
+
+import org.eclipse.ant.core.AntCorePlugin;
+import org.eclipse.ant.tests.core.AbstractAntTest;
+import org.eclipse.ant.tests.core.testplugin.AntTestChecker;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+
+
+public class ProjectTests extends AbstractAntTest {
+
+ public ProjectTests(String name) {
+ super(name);
+ }
+
+ /**
+ * Tests that the three properties that should always be set are correct
+ */
+ public void testBasePropertiesSet() throws CoreException {
+ String buildFileName="TestForEcho.xml";
+ run(buildFileName);
+ IFile buildFile= getBuildFile(buildFileName);
+ String fullName= buildFile.getLocation().toFile().getAbsolutePath();
+ assertEquals("eclipse.running should have been set as true", "true", AntTestChecker.getDefault().getUserProperty("eclipse.running"));
+ assertEquals("ant.file should have been set as the build file name", fullName, AntTestChecker.getDefault().getUserProperty("ant.file"));
+ assertNotNull("ant.java.version should have been set", AntTestChecker.getDefault().getUserProperty("ant.java.version"));
+ assertNotNull("ant.version should have been set", AntTestChecker.getDefault().getUserProperty("ant.version"));
+ assertNotNull("eclipse.home should have been set", AntTestChecker.getDefault().getUserProperty("eclipse.home"));
+ }
+
+ public void testValue() throws CoreException {
+ String buildFileName="TestForEcho.xml";
+ run(buildFileName);
+ assertEquals("property.testing should have been set as true", "true", AntTestChecker.getDefault().getUserProperty("property.testing"));
+ }
+
+ public void testValueWithClass() throws CoreException {
+
+ String buildFileName="TestForEcho.xml";
+ run(buildFileName);
+ assertEquals("property.testing2 should have been set as hey", "hey", AntTestChecker.getDefault().getUserProperty("property.testing2"));
+ }
+
+ public void testClass() throws CoreException {
+ String buildFileName="TestForEcho.xml";
+ run(buildFileName);
+ assertEquals("property.testing3 should have been set as AntTestPropertyProvider", "AntTestPropertyValueProvider", AntTestChecker.getDefault().getUserProperty("property.testing3"));
+ }
+
+ public void testHeadless() throws CoreException {
+ try {
+ AntCorePlugin.getPlugin().setRunningHeadless(true);
+ String buildFileName="TestForEcho.xml";
+ run(buildFileName);
+ assertNull("property.headless should not have been set as AntTestPropertyProvider", AntTestChecker.getDefault().getUserProperty("property.headless"));
+ } finally {
+ AntCorePlugin.getPlugin().setRunningHeadless(false);
+ }
+ }
+
+ public void testNotHeadless() throws CoreException {
+ String buildFileName="TestForEcho.xml";
+ run(buildFileName);
+ assertEquals("property.headless should have been set as AntTestPropertyProvider", "headless", AntTestChecker.getDefault().getUserProperty("property.headless"));
+ }
+} \ No newline at end of file
diff --git a/ant/org.eclipse.ant.tests.core/tests/org/eclipse/ant/tests/core/tests/TaskTests.java b/ant/org.eclipse.ant.tests.core/tests/org/eclipse/ant/tests/core/tests/TaskTests.java
new file mode 100644
index 000000000..24ae8123f
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.core/tests/org/eclipse/ant/tests/core/tests/TaskTests.java
@@ -0,0 +1,151 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 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:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.tests.core.tests;
+
+import java.io.File;
+import java.net.URL;
+
+import org.eclipse.ant.core.AntCorePlugin;
+import org.eclipse.ant.core.AntCorePreferences;
+import org.eclipse.ant.core.IAntClasspathEntry;
+import org.eclipse.ant.core.Property;
+import org.eclipse.ant.core.Task;
+import org.eclipse.ant.internal.core.AntClasspathEntry;
+import org.eclipse.ant.tests.core.AbstractAntTest;
+import org.eclipse.ant.tests.core.testplugin.AntTestChecker;
+import org.eclipse.ant.tests.core.testplugin.ProjectHelper;
+import org.eclipse.core.runtime.CoreException;
+
+public class TaskTests extends AbstractAntTest {
+
+
+ public TaskTests(String name) {
+ super(name);
+ }
+
+ /**
+ * Testing the old deprecated API
+ * @throws CoreException
+ */
+ public void testAddTaskSettingLibrary() throws CoreException {
+ AntCorePreferences prefs =AntCorePlugin.getPlugin().getPreferences();
+ URL[] urls= prefs.getExtraClasspathURLs();
+ Task newTask= new Task();
+ newTask.setLibrary(urls[0]);
+ newTask.setTaskName("AntTestTask");
+ newTask.setClassName("org.eclipse.ant.tests.core.support.tasks.AntTestTask");
+ prefs.setCustomTasks(new Task[]{newTask});
+
+ prefs.updatePluginPreferences();
+
+ run("CustomTask.xml", new String[0], false);
+ String msg= (String)AntTestChecker.getDefault().getMessages().get(1);
+ assertEquals("Message incorrect: " + msg, "Testing Ant in Eclipse with a custom task", msg);
+ assertSuccessful();
+ }
+
+ public void testAddTaskSettingLibraryEntry() throws CoreException {
+ AntCorePreferences prefs =AntCorePlugin.getPlugin().getPreferences();
+ URL[] urls= prefs.getExtraClasspathURLs();
+ Task newTask= new Task();
+ newTask.setLibraryEntry(new AntClasspathEntry(urls[0]));
+ newTask.setTaskName("AntTestTask2");
+ newTask.setClassName("org.eclipse.ant.tests.core.support.tasks.AntTestTask");
+ prefs.setCustomTasks(new Task[]{newTask});
+
+ prefs.updatePluginPreferences();
+
+ run("CustomTask.xml", new String[] {"Custom Task from Entry"}, false);
+ String msg= (String)AntTestChecker.getDefault().getMessages().get(1);
+ assertEquals("Message incorrect: " + msg, "Testing Ant in Eclipse with a custom task", msg);
+ assertSuccessful();
+ }
+
+ public void testRemoveTask() {
+ AntCorePreferences prefs =AntCorePlugin.getPlugin().getPreferences();
+ prefs.setCustomTasks(new Task[]{});
+ try {
+ run("CustomTask.xml");
+ } catch (CoreException ce) {
+ assertTrue("Exception from undefined task is incorrect", ce.getMessage().trim().endsWith("Action: Check that any <presetdef>/<macrodef> declarations have taken place."));
+ return;
+ } finally {
+ restorePreferenceDefaults();
+ }
+ assertTrue("Build should have failed as task no longer defined", false);
+ }
+
+ public void testAddTaskFromFolder() throws CoreException {
+ try {
+ AntCorePreferences prefs =AntCorePlugin.getPlugin().getPreferences();
+ Task newTask= new Task();
+ String path= getProject().getFolder(ProjectHelper.LIB_FOLDER).getFile("taskFolder").getLocation().toFile().getAbsolutePath();
+ IAntClasspathEntry entry= new AntClasspathEntry(path + File.separatorChar);
+ IAntClasspathEntry entries[] = prefs.getAdditionalClasspathEntries();
+ IAntClasspathEntry newEntries[] = new IAntClasspathEntry[entries.length + 1];
+ System.arraycopy(entries, 0, newEntries, 0, entries.length);
+ newEntries[entries.length] = entry;
+ prefs.setAdditionalClasspathEntries(newEntries);
+
+ newTask.setLibraryEntry(entry);
+ newTask.setTaskName("AntTestTask");
+ newTask.setClassName("org.eclipse.ant.tests.core.support.tasks.AntTestTask2");
+ prefs.setCustomTasks(new Task[]{newTask});
+
+ prefs.updatePluginPreferences();
+
+ run("CustomTask.xml", new String[0], false);
+ String msg= (String)AntTestChecker.getDefault().getMessages().get(1);
+ assertEquals("Message incorrect: " + msg, "Testing Ant in Eclipse with a custom task", msg);
+ assertSuccessful();
+ } finally {
+ restorePreferenceDefaults();
+ }
+ }
+
+ public void testTasksDefinedInPropertyFile() throws CoreException {
+ try {
+ AntCorePreferences prefs =AntCorePlugin.getPlugin().getPreferences();
+ Property newProp= new Property("ROOTDIR", "..//resources");
+ prefs.setCustomProperties(new Property[]{newProp});
+ run("Bug34663.xml");
+ } finally {
+ restorePreferenceDefaults();
+ }
+ }
+
+ public void testTaskDefinedInExtensionPoint() throws CoreException {
+ run("ExtensionPointTask.xml");
+ String msg= (String)AntTestChecker.getDefault().getMessages().get(1);
+ assertEquals("Message incorrect: " + msg, "Testing Ant in Eclipse with a custom task", msg);
+ assertSuccessful();
+ }
+
+ public void testTaskDefinedInExtensionPointHeadless() {
+ AntCorePlugin.getPlugin().setRunningHeadless(true);
+ try {
+ run("ExtensionPointTask.xml");
+ } catch (CoreException ce) {
+ assertTrue("Exception from undefined task is incorrect", ce.getMessage().trim().endsWith("Action: Check that any <presetdef>/<macrodef> declarations have taken place."));
+ return;
+ } finally {
+ AntCorePlugin.getPlugin().setRunningHeadless(false);
+ }
+ assertTrue("Build should have failed as task was not defined to run in headless", false);
+ }
+
+ public void testTaskDefinedInExtensionPointWithURI() throws CoreException {
+ run("ExtensionPointTask.xml");
+ String msg= (String)AntTestChecker.getDefault().getMessages().get(2);
+ assertEquals("Message incorrect: " + msg, "Testing Ant in Eclipse with a custom task", msg);
+ assertSuccessful();
+ }
+} \ No newline at end of file
diff --git a/ant/org.eclipse.ant.tests.core/tests/org/eclipse/ant/tests/core/tests/TypeTests.java b/ant/org.eclipse.ant.tests.core/tests/org/eclipse/ant/tests/core/tests/TypeTests.java
new file mode 100644
index 000000000..2e30fccc0
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.core/tests/org/eclipse/ant/tests/core/tests/TypeTests.java
@@ -0,0 +1,79 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2007 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.tests.core.tests;
+
+
+import java.net.URL;
+
+import org.eclipse.ant.core.AntCorePlugin;
+import org.eclipse.ant.core.AntCorePreferences;
+import org.eclipse.ant.core.Type;
+import org.eclipse.ant.internal.core.AntClasspathEntry;
+import org.eclipse.ant.tests.core.AbstractAntTest;
+import org.eclipse.ant.tests.core.testplugin.AntTestChecker;
+import org.eclipse.core.runtime.CoreException;
+
+public class TypeTests extends AbstractAntTest {
+
+ public TypeTests(String name) {
+ super(name);
+ }
+
+ public void testAddType() throws CoreException {
+ AntCorePreferences prefs =AntCorePlugin.getPlugin().getPreferences();
+ URL[] urls= prefs.getExtraClasspathURLs();
+ Type newType= new Type();
+ newType.setLibraryEntry(new AntClasspathEntry(urls[0]));
+ newType.setTypeName("anttestpath");
+ newType.setClassName("org.eclipse.ant.tests.core.support.types.AntTestPath");
+ prefs.setCustomTypes(new Type[]{newType});
+
+ run("CustomType.xml");
+ String msg= (String)AntTestChecker.getDefault().getMessages().get(1);
+ assertEquals("Message incorrect: " + msg, "Test adding a custom type", msg);
+ assertSuccessful();
+ }
+
+ public void testRemoveType() {
+ AntCorePreferences prefs =AntCorePlugin.getPlugin().getPreferences();
+ prefs.setCustomTypes(new Type[]{});
+ try {
+ run("CustomType.xml");
+ } catch (CoreException ce) {
+ assertTrue("Exception from undefined type is incorrect: "+ ce.getMessage(), ce.getMessage().trim().endsWith("Action: Check that any <presetdef>/<macrodef> declarations have taken place."));
+ return;
+ } finally {
+ restorePreferenceDefaults();
+ }
+ assertTrue("Build should have failed as type no longer defined", false);
+
+ }
+
+ public void testTypeDefinedInExtensionPoint() throws CoreException {
+ run("ExtensionPointType.xml");
+ String msg= (String)AntTestChecker.getDefault().getMessages().get(1);
+ assertEquals("Message incorrect: " + msg, "Ensure that an extension point defined type is present", msg);
+ assertSuccessful();
+ }
+
+ public void testTypeDefinedInExtensionPointHeadless() {
+ AntCorePlugin.getPlugin().setRunningHeadless(true);
+ try {
+ run("ExtensionPointType.xml");
+ } catch (CoreException ce) {
+ assertTrue("Exception from undefined type is incorrect: " + ce.getMessage(), ce.getMessage().trim().endsWith("Action: Check that any <presetdef>/<macrodef> declarations have taken place."));
+ return;
+ } finally {
+ AntCorePlugin.getPlugin().setRunningHeadless(false);
+ }
+ assertTrue("Build should have failed as type was not defined to run in headless", false);
+ }
+} \ No newline at end of file
diff --git a/ant/org.eclipse.ant.tests.ui/.classpath b/ant/org.eclipse.ant.tests.ui/.classpath
new file mode 100644
index 000000000..3b2694c9a
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/.classpath
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="Ant Editor Tests"/>
+ <classpathentry kind="src" path="Ant Debug Tests"/>
+ <classpathentry kind="src" path="test plugin"/>
+ <classpathentry kind="src" path="Ant Tests"/>
+ <classpathentry kind="src" path="External Tools"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+ <classpathentry kind="src" output="test_support_bin" path="test support"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/ant/org.eclipse.ant.tests.ui/.externalToolBuilders/Build Test Support JAR.launch b/ant/org.eclipse.ant.tests.ui/.externalToolBuilders/Build Test Support JAR.launch
new file mode 100644
index 000000000..71fd1f3b7
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/.externalToolBuilders/Build Test Support JAR.launch
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
+<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
+<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
+<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="true"/>
+<stringAttribute key="org.eclipse.ant.ui.ATTR_ANT_CLEAN_TARGETS" value="clean,"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_BUILD_SCOPE" value="${working_set:&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;launchConfigurationWorkingSet factoryID=&quot;org.eclipse.ui.internal.WorkingSetFactory&quot; name=&quot;workingSet&quot; editPageId=&quot;org.eclipse.ui.resourceWorkingSetPage&quot;&gt;&#10;&lt;item factoryID=&quot;org.eclipse.ui.internal.model.ResourceFactory&quot; path=&quot;/org.eclipse.ant.tests.ui/buildfiles/buildAntTestsSupportJAR.xml&quot; type=&quot;1&quot;/&gt;&#10;&lt;item factoryID=&quot;org.eclipse.ui.internal.model.ResourceFactory&quot; path=&quot;/org.eclipse.ant.tests.ui/test support&quot; type=&quot;2&quot;/&gt;&#10;&lt;/launchConfigurationWorkingSet&gt;&#10;}"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,auto,clean"/>
+<booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/>
+<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${working_set:&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;launchConfigurationWorkingSet factoryID=&quot;org.eclipse.ui.internal.WorkingSetFactory&quot; name=&quot;workingSet&quot; editPageId=&quot;org.eclipse.ui.resourceWorkingSetPage&quot;&gt;&#10;&lt;item factoryID=&quot;org.eclipse.ui.internal.model.ResourceFactory&quot; path=&quot;/org.eclipse.ant.tests.ui&quot; type=&quot;4&quot;/&gt;&#10;&lt;/launchConfigurationWorkingSet&gt;&#10;}"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/org.eclipse.ant.tests.ui/buildfiles/buildAntTestsSupportJAR.xml}"/>
+<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
+<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
+<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
+</launchConfiguration>
diff --git a/ant/org.eclipse.ant.tests.ui/.project b/ant/org.eclipse.ant.tests.ui/.project
new file mode 100644
index 000000000..3c759b06f
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/.project
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.ant.tests.ui</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
+ <arguments>
+ <dictionary>
+ <key>LaunchConfigHandle</key>
+ <value>&lt;project&gt;/.externalToolBuilders/Build Test Support JAR.launch</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
diff --git a/ant/org.eclipse.ant.tests.ui/.settings/org.eclipse.pde.core.prefs b/ant/org.eclipse.ant.tests.ui/.settings/org.eclipse.pde.core.prefs
new file mode 100644
index 000000000..0f654cf39
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/.settings/org.eclipse.pde.core.prefs
@@ -0,0 +1,3 @@
+#Thu May 27 14:48:38 PDT 2004
+eclipse.preferences.version=1
+selfhosting.binExcludes=/org.eclipse.ant.tests.ui/test_support_bin
diff --git a/ant/org.eclipse.ant.tests.ui/.settings/org.eclipse.pde.prefs b/ant/org.eclipse.ant.tests.ui/.settings/org.eclipse.pde.prefs
new file mode 100644
index 000000000..facd8d234
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/.settings/org.eclipse.pde.prefs
@@ -0,0 +1,29 @@
+#Mon Dec 14 11:41:00 CST 2009
+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=1
+compilers.incompatible-environment=1
+compilers.p.build=1
+compilers.p.build.missing.output=1
+compilers.p.deprecated=1
+compilers.p.discouraged-class=1
+compilers.p.illegal-att-value=0
+compilers.p.internal=1
+compilers.p.missing-packages=2
+compilers.p.missing-version-export-package=2
+compilers.p.missing-version-import-package=2
+compilers.p.missing-version-require-bundle=2
+compilers.p.no-required-att=0
+compilers.p.not-externalized-att=1
+compilers.p.unknown-attribute=0
+compilers.p.unknown-class=1
+compilers.p.unknown-element=0
+compilers.p.unknown-identifier=1
+compilers.p.unknown-resource=1
+compilers.p.unresolved-ex-points=0
+compilers.p.unresolved-import=0
+compilers.p.unused-element-or-attribute=1
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
+compilers.use-project=true
+eclipse.preferences.version=1
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
new file mode 100644
index 000000000..28e521452
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/Ant Debug Tests/org/eclipse/ant/tests/ui/debug/BreakpointTests.java
@@ -0,0 +1,217 @@
+/*******************************************************************************
+ * 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.tests.ui.debug;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.ant.internal.launching.debug.model.AntDebugTarget;
+import org.eclipse.ant.internal.launching.debug.model.AntThread;
+import org.eclipse.ant.launching.IAntLaunchConstants;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.DebugException;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.debug.core.model.IBreakpoint;
+import org.eclipse.debug.core.model.ILineBreakpoint;
+
+/**
+ * Tests Ant breakpoints.
+ */
+public class BreakpointTests extends AbstractAntDebugTest {
+
+ public BreakpointTests(String name) {
+ super(name);
+ }
+
+ public void testDeferredBreakpoints() throws Exception {
+ deferredBreakpoints(false);
+ }
+
+ public void testDeferredBreakpointsSepVM() throws Exception {
+ deferredBreakpoints(true);
+ }
+
+ private void deferredBreakpoints(boolean sepVM) throws Exception, CoreException, DebugException {
+ String fileName = "breakpoints";
+ IFile file= getIFile(fileName + ".xml");
+ List bps = new ArrayList();
+ bps.add(createLineBreakpoint(5, file));
+ bps.add(createLineBreakpoint(14, file));
+ AntThread thread= null;
+ try {
+ thread= launchToBreakpoint(fileName, true, sepVM);
+ assertNotNull("Breakpoint not hit within timeout period", thread);
+ while (!bps.isEmpty()) {
+ IBreakpoint hit = getBreakpoint(thread);
+ assertNotNull("suspended, but not by breakpoint", hit);
+ assertTrue("hit un-registered breakpoint", bps.contains(hit));
+ assertTrue("suspended, but not by line breakpoint", hit instanceof ILineBreakpoint);
+ ILineBreakpoint breakpoint= (ILineBreakpoint) hit;
+ int lineNumber = breakpoint.getLineNumber();
+ int stackLine = thread.getTopStackFrame().getLineNumber();
+ assertEquals("line numbers of breakpoint and stack frame do not match", lineNumber, stackLine);
+ bps.remove(breakpoint);
+ breakpoint.delete();
+ if (!bps.isEmpty()) {
+ if (sepVM) {
+ waitForTarget();
+ }
+ thread = resume(thread);
+ }
+ }
+ } finally {
+ terminateAndRemove(thread);
+ removeAllBreakpoints();
+ }
+ }
+
+ public void testDisabledBreakpoint() throws Exception {
+ disabledBreakpoint(false);
+ }
+
+ public void testDisabledBreakpointSepVM() throws Exception {
+ disabledBreakpoint(true);
+ }
+
+ private void disabledBreakpoint(boolean separateVM) throws Exception, CoreException {
+ String fileName = "breakpoints";
+ ILineBreakpoint bp = createLineBreakpoint(5, fileName + ".xml");
+ bp.setEnabled(false);
+ AntDebugTarget debugTarget = null;
+ try {
+ debugTarget= launchAndTerminate(fileName, separateVM);
+ } finally {
+ terminateAndRemove(debugTarget);
+ removeAllBreakpoints();
+ }
+ }
+
+ public void testEnableDisableBreakpoint() throws Exception {
+ enableDisableBreapoint(false);
+ }
+
+ public void testEnableDisableBreakpointSepVM() throws Exception {
+ enableDisableBreapoint(true);
+ }
+
+ private void enableDisableBreapoint(boolean sepVM) throws Exception, CoreException {
+
+ String fileName = "breakpoints";
+ ILineBreakpoint bp = createLineBreakpoint(5, fileName + ".xml");
+ bp.setEnabled(true);
+ AntThread thread = null;
+ try {
+ if (sepVM) {
+ fileName+= "SepVM";
+ }
+ ILaunchConfiguration config= getLaunchConfiguration(fileName);
+ ILaunchConfigurationWorkingCopy copy= config.getWorkingCopy();
+ copy.setAttribute(IAntLaunchConstants.ATTR_ANT_TARGETS, "entry1,entry2");
+ thread= launchToLineBreakpoint(copy, bp);
+ bp.setEnabled(false);
+ if (sepVM) {
+ waitForTarget();
+ }
+ resumeAndExit(thread);
+ } finally {
+ terminateAndRemove(thread);
+ removeAllBreakpoints();
+ }
+ }
+
+ private synchronized void waitForTarget() {
+ try {
+ //wait for the target to get updated for the new breakpoint state
+ wait(1000);
+ } catch (InterruptedException ie) {
+ }
+ }
+
+ public void testSkipLineBreakpoint() throws Exception {
+ skipLineBreakpoint(false);
+ }
+
+ public void testSkipLineBreakpointSepVM() throws Exception {
+ skipLineBreakpoint(true);
+ }
+
+ private void skipLineBreakpoint(boolean sepVM) throws Exception {
+ String fileName = "breakpoints";
+ IFile file= getIFile(fileName + ".xml");
+ ILineBreakpoint bp = createLineBreakpoint(5, file);
+ createLineBreakpoint(15, file);
+ AntThread thread = null;
+ try {
+ if (sepVM) {
+ fileName+= "SepVM";
+ }
+ thread= launchToLineBreakpoint(fileName, bp);
+ getBreakpointManager().setEnabled(false);
+ resumeAndExit(thread);
+ } finally {
+ terminateAndRemove(thread);
+ removeAllBreakpoints();
+ getBreakpointManager().setEnabled(true);
+ }
+ }
+
+ public void testBreakpoint() throws Exception {
+ breakpoints(false, "default", 5, 15);
+ }
+
+ public void testBreakpointSepVM() throws Exception {
+ breakpoints(true, "default", 5, 15);
+ }
+
+ public void testTargetBreakpoint() throws Exception {
+ breakpoints(false, "entry2", 4, 24);
+ }
+
+ public void testTaskOutOfTargetBreakpoint() throws Exception {
+ breakpoints(false, "entry2", 36, 5);
+ }
+
+ public void testTaskOutOfTargetBreakpointSepVm() throws Exception {
+ breakpoints(true, "entry2", 36, 5);
+ }
+
+ public void testTargetBreakpointSepVM() throws Exception {
+ breakpoints(true, "entry2", 4, 24);
+ }
+
+ private void breakpoints(boolean sepVM, String defaultTargetName, int firstLineNumber, int secondLineNumber) throws CoreException {
+ String fileName = "breakpoints";
+ IFile file= getIFile(fileName + ".xml");
+ ILineBreakpoint bp = createLineBreakpoint(firstLineNumber, file);
+ AntThread thread = null;
+ try {
+ if (sepVM) {
+ fileName+= "SepVM";
+ }
+ ILaunchConfiguration config= getLaunchConfiguration(fileName);
+ ILaunchConfigurationWorkingCopy copy= config.getWorkingCopy();
+ copy.setAttribute(IAntLaunchConstants.ATTR_ANT_TARGETS, defaultTargetName);
+ if (!sepVM) {
+ Thread.sleep(3000); //TODO bug 121207: wait for previous launch to fully terminate
+ }
+ thread= launchToLineBreakpoint(copy, bp);
+ bp= createLineBreakpoint(secondLineNumber, file);
+ resumeToLineBreakpoint(thread, bp);
+ } catch (InterruptedException e) {
+
+ } finally {
+ terminateAndRemove(thread);
+ removeAllBreakpoints();
+ }
+ }
+}
diff --git a/ant/org.eclipse.ant.tests.ui/Ant Debug Tests/org/eclipse/ant/tests/ui/debug/DebugElementEventWaiter.java b/ant/org.eclipse.ant.tests.ui/Ant Debug Tests/org/eclipse/ant/tests/ui/debug/DebugElementEventWaiter.java
new file mode 100644
index 000000000..768a87d0a
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/Ant Debug Tests/org/eclipse/ant/tests/ui/debug/DebugElementEventWaiter.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 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:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.tests.ui.debug;
+
+import org.eclipse.ant.tests.ui.testplugin.DebugEventWaiter;
+import org.eclipse.debug.core.DebugEvent;
+
+/**
+ * Waits for an event on a specific element
+ */
+
+public class DebugElementEventWaiter extends DebugEventWaiter {
+
+ protected Object fElement;
+
+ public DebugElementEventWaiter(int kind, Object element) {
+ super(kind);
+ fElement = element;
+ }
+
+ public boolean accept(DebugEvent event) {
+ return super.accept(event) && fElement == event.getSource();
+ }
+
+}
diff --git a/ant/org.eclipse.ant.tests.ui/Ant Debug Tests/org/eclipse/ant/tests/ui/debug/DebugElementKindEventDetailWaiter.java b/ant/org.eclipse.ant.tests.ui/Ant Debug Tests/org/eclipse/ant/tests/ui/debug/DebugElementKindEventDetailWaiter.java
new file mode 100644
index 000000000..93d96ae13
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/Ant Debug Tests/org/eclipse/ant/tests/ui/debug/DebugElementKindEventDetailWaiter.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 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:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.tests.ui.debug;
+
+import org.eclipse.ant.tests.ui.testplugin.DebugElementKindEventWaiter;
+import org.eclipse.debug.core.DebugEvent;
+
+/**
+ * Wait for the specified event with the specified from the specified element.
+ */
+public class DebugElementKindEventDetailWaiter extends DebugElementKindEventWaiter {
+
+ protected int fDetail;
+
+ public DebugElementKindEventDetailWaiter(int eventKind, Class elementClass, int detail) {
+ super(eventKind, elementClass);
+ fDetail = detail;
+ }
+
+ public boolean accept(DebugEvent event) {
+ return super.accept(event) && fDetail == event.getDetail();
+ }
+
+}
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
new file mode 100644
index 000000000..61f5a5dfc
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/Ant Debug Tests/org/eclipse/ant/tests/ui/debug/StackTests.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * 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
+ *******************************************************************************/
+package org.eclipse.ant.tests.ui.debug;
+
+import org.eclipse.ant.internal.launching.debug.model.AntThread;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.model.ILineBreakpoint;
+import org.eclipse.debug.core.model.IStackFrame;
+
+public class StackTests extends AbstractAntDebugTest {
+
+ public StackTests(String name) {
+ super(name);
+ }
+
+ public void testStackForAntCall() throws Exception {
+ antCallStack(false);
+ }
+
+ public void testStackForAntCallVM() throws Exception {
+ antCallStack(true);
+ }
+
+ private void antCallStack(boolean sepVM) throws CoreException {
+ String fileName = "85769";
+ IFile file= getIFile(fileName + ".xml");
+ ILineBreakpoint bp = createLineBreakpoint(18, file);
+ AntThread thread = null;
+ try {
+ if (sepVM) {
+ fileName+= "SepVM";
+ }
+ thread= launchToLineBreakpoint(fileName, bp);
+
+
+ IStackFrame[] frames= thread.getStackFrames();
+
+ assertTrue(frames.length == 3);
+ IStackFrame frame = frames[0];
+ frame.getName().equals("");
+ } finally {
+ terminateAndRemove(thread);
+ removeAllBreakpoints();
+ }
+ }
+}
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
new file mode 100644
index 000000000..e76d1a59d
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/Ant Debug Tests/org/eclipse/ant/tests/ui/debug/SteppingTests.java
@@ -0,0 +1,234 @@
+/*******************************************************************************
+ * 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
+ *******************************************************************************/
+package org.eclipse.ant.tests.ui.debug;
+
+import org.eclipse.ant.internal.launching.debug.model.AntStackFrame;
+import org.eclipse.ant.internal.launching.debug.model.AntThread;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.DebugEvent;
+import org.eclipse.debug.core.DebugException;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.model.ILineBreakpoint;
+import org.eclipse.debug.core.model.IStackFrame;
+
+public class SteppingTests extends AbstractAntDebugTest {
+
+ public SteppingTests(String name) {
+ super(name);
+ }
+
+ /**
+ * bug 84400
+ */
+ public void testStepBackFromAntCall() throws Exception {
+ antCallStack(false, 12, DebugEvent.STEP_OVER, "default: echo", 7);
+ }
+
+ /**
+ * bug 84400
+ */
+ public void testStepBackFromAntCallSepVM() throws Exception {
+ antCallStack(true, 12, DebugEvent.STEP_OVER, "default: echo", 7);
+ }
+
+ /**
+ * bug 88218, 85769
+ */
+ public void testStepIntoAntCall() throws Exception {
+ AntThread thread= null;
+ try {
+ thread= antCallStack(false, 5, DebugEvent.STEP_INTO, "pre-call: echo", 16, false);
+ IStackFrame[] frames= thread.getStackFrames();
+ assertFrame("call", 10, (AntStackFrame)frames[1]);
+ } finally {
+ terminateAndRemove(thread);
+ removeAllBreakpoints();
+ }
+ }
+
+ /**
+ * bug 88218, 85769
+ */
+ public void testStepIntoAntCallSepVM() throws Exception {
+ AntThread thread= null;
+ try {
+ thread= antCallStack(true, 5, DebugEvent.STEP_INTO, "pre-call: echo", 16, false);
+ IStackFrame[] frames= thread.getStackFrames();
+ assertFrame("call", 10, (AntStackFrame)frames[1]);
+ } finally {
+ terminateAndRemove(thread);
+ removeAllBreakpoints();
+ }
+ }
+
+ public void testStepOverAntCall() throws Exception {
+ antCallStack(false, 5, DebugEvent.STEP_OVER, "default: echo", 7);
+ }
+
+ public void testStepOverAntCallSepVM() throws Exception {
+ antCallStack(true, 5, DebugEvent.STEP_OVER, "default: echo", 7);
+ }
+
+ /**
+ * bug 96022
+ */
+ public void testStepOverAntCallPastOtherAntCalls() throws Exception {
+ debugStack(false, 7, DebugEvent.STEP_OVER, "default: echo", 9, "96022", true);
+ }
+ /**
+ * bug 96022
+ */
+ public void testStepOverAntCallPastOtherAntCallsSepVm() throws Exception {
+ debugStack(true, 7, DebugEvent.STEP_OVER, "default: echo", 9, "96022", true);
+ }
+
+ public void testStepOverAntCallHitBreakpoint() throws Exception {
+ String fileName = "debugAntCall";
+ createLineBreakpoint(12, fileName + ".xml");
+ antCallStack(false, 5, DebugEvent.BREAKPOINT, "call: sleep", 12);
+ }
+
+ public void testStepOverAntCallHitBreakpointSepVM() throws Exception {
+ String fileName = "debugAntCall";
+ createLineBreakpoint(12, fileName + ".xml");
+ antCallStack(true, 5, DebugEvent.BREAKPOINT, "call: sleep", 12);
+ }
+
+ private AntThread antCallStack(boolean sepVM, int lineNumber, int kind, String frameName, int frameLineNumber) throws CoreException {
+ return antCallStack(sepVM, lineNumber, kind, frameName, frameLineNumber, true);
+ }
+
+ private AntThread antCallStack(boolean sepVM, int lineNumber, int kind, String frameName, int frameLineNumber, boolean terminate) throws CoreException {
+ String fileName = "debugAntCall";
+ return debugStack(sepVM, lineNumber, kind, frameName, frameLineNumber, fileName, terminate);
+ }
+
+ private AntThread debugStack(boolean sepVM, int lineNumber, int kind, String frameName, int frameLineNumber, String fileName, boolean terminate) throws CoreException, DebugException {
+ ILineBreakpoint bp = createLineBreakpoint(lineNumber, fileName + ".xml");
+ AntThread thread= null;
+ try {
+ if (sepVM) {
+ fileName+="SepVM";
+ }
+ ILaunchConfiguration config= getLaunchConfiguration(fileName);
+ thread= launchToLineBreakpoint(config, bp);
+ debugFrame(kind, frameName, frameLineNumber, thread);
+ return thread;
+ } finally {
+ if (terminate) {
+ terminateAndRemove(thread);
+ removeAllBreakpoints();
+ }
+ }
+ }
+
+ private void debugFrame(int kind, String frameName, int frameLineNumber, AntThread thread) throws DebugException {
+ AntStackFrame frame = (AntStackFrame)thread.getTopStackFrame();
+ assertNotNull(frame);
+ switch (kind) {
+ case DebugEvent.BREAKPOINT:
+ stepOverToHitBreakpoint(frame);
+ break;
+ case DebugEvent.STEP_OVER:
+ stepOver(frame);
+ break;
+ case DebugEvent.STEP_INTO:
+ stepInto(frame);
+ break;
+ }
+ assertFrame(thread, frameName, frameLineNumber);
+ }
+
+ private AntStackFrame assertFrame(AntThread thread, String frameName, int lineNumber) throws DebugException {
+ AntStackFrame frame = (AntStackFrame)thread.getTopStackFrame();
+ return assertFrame(frameName, lineNumber, frame);
+ }
+
+ private AntStackFrame assertFrame(String frameName, int lineNumber, AntStackFrame frame) {
+ String actualFrameName= frame.getName();
+ int actualLineNumber= frame.getLineNumber();
+ assertTrue("Name of stack frame incorrect. Expected " + frameName + " was: " + actualFrameName, frameName.equals(actualFrameName));
+ assertTrue("Line number of stack frame incorrect. Expected " + lineNumber + " was: " + actualLineNumber, lineNumber == actualLineNumber);
+ return frame;
+ }
+
+ /**
+ * bug 85309
+ * @throws CoreException
+ */
+ public void testStepOutOfMacrodef() throws CoreException {
+ String fileName = "macrodef";
+ debugStack(false, 8 , DebugEvent.STEP_OVER, "type: eclipseMacro", 16, fileName, true);
+ }
+
+ /**
+ * bug 85309
+ * @throws CoreException
+ */
+ public void testStepOutOfMacrodefSepVM() throws CoreException {
+ String fileName = "macrodef";
+ debugStack(true, 8 , DebugEvent.STEP_OVER, "type: eclipseMacro", 16, fileName, true);
+ }
+
+ /**
+ * bug 94769
+ * @throws CoreException
+ */
+ public void testStepIntoMacrodef() throws CoreException {
+ testMacroDef(false);
+ }
+
+ /**
+ * bug 94769
+ * @throws CoreException
+ */
+ public void testStepIntoMacrodefSepVM() throws CoreException {
+ testMacroDef(true);
+ }
+
+ private void testMacroDef(boolean sepVM) throws CoreException, DebugException {
+ AntThread thread= null;
+ try {
+ String fileName = "macrodef";
+ thread= debugStack(sepVM, 16 , DebugEvent.STEP_INTO, "type: sequential", 0, fileName, false);
+ debugFrame(DebugEvent.STEP_INTO, "type: echo", 8, thread);
+ debugFrame(DebugEvent.STEP_OVER, "type: eclipseMacro", 17, thread);
+ } finally {
+ terminateAndRemove(thread);
+ removeAllBreakpoints();
+ }
+ }
+
+// public void testStepBackFromAnt() throws Exception {
+// antCallStack(false);
+// }
+//
+// public void testStepBackFromAntSepVM() throws Exception {
+// antCallStack(false);
+// }
+//
+//
+// public void testStepIntoAnt() throws Exception {
+// antCallStack(false);
+// }
+//
+// public void testStepIntoAntSepVM() throws Exception {
+// antCallStack(false);
+// }
+//
+// public void testStepOverAnt() throws Exception {
+// antCallStack(false);
+// }
+//
+// public void testStepOverAntSepVM() throws Exception {
+// antCallStack(false);
+// }
+}
diff --git a/ant/org.eclipse.ant.tests.ui/Ant Editor Tests/org/eclipse/ant/tests/ui/dtd/dumper.java b/ant/org.eclipse.ant.tests.ui/Ant Editor Tests/org/eclipse/ant/tests/ui/dtd/dumper.java
new file mode 100644
index 000000000..b6d6d16f7
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/Ant Editor Tests/org/eclipse/ant/tests/ui/dtd/dumper.java
@@ -0,0 +1,147 @@
+/*******************************************************************************
+ * Copyright (c) 2002, 2005 Object Factory Inc.
+ * 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:
+ * Object Factory Inc. - Initial implementation
+ *******************************************************************************/
+
+package org.eclipse.ant.tests.ui.dtd;
+
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.Map;
+
+import org.eclipse.ant.internal.ui.dtd.IDfm;
+import org.eclipse.ant.internal.ui.dtd.IElement;
+import org.eclipse.ant.internal.ui.dtd.IModel;
+import org.eclipse.ant.internal.ui.dtd.ISchema;
+import org.eclipse.ant.internal.ui.dtd.ParseError;
+import org.eclipse.ant.internal.ui.dtd.Parser;
+
+/**
+ * This class is intended to be used from the command line (hence the
+ * uncapitalized class name).
+ * @author Bob Foster
+ */
+public class dumper {
+
+ public static int main(String[] args) {
+
+ if (args.length <= 0) {
+ System.out.println("Usage: java DTDMerger URL");
+ return 0;
+ }
+ String document = args[0];
+
+ Parser parser = new Parser();
+
+ ISchema schema;
+ try {
+ schema = parser.parse(document);
+ } catch (ParseError e) {
+ System.out.println(e.getMessage());
+ e.printStackTrace();
+ return 1;
+ } catch (IOException e) {
+ e.printStackTrace();
+ return 1;
+ }
+ System.out.println("DTD successfully parsed");
+ dumpSchema(schema);
+ return 0;
+ }
+
+ /**
+ * Write schema contents to standard output.
+ */
+ private static void dumpSchema(ISchema schema) {
+ IElement[] elements = schema.getElements();
+ System.out.println(""+elements.length+" elements defined");
+ for (int i = 0; i < elements.length; i++) {
+ IElement element = elements[i];
+ IModel model = element.getContentModel();
+ System.out.println("ELEMENT "+element.getName()
+ +'"'+model.stringRep()+'"');
+ dumpDfm(element.getDfm());
+ }
+ }
+
+ /**
+ * Dump dfm as a series of states.
+ * <pre>
+ * S0 a=>S1 b=>S2
+ * S1 c=>S2
+ * S2* d=>S2
+ * </pre>
+ * Where * indicates accepting state.
+ * @param dfm to dump
+ */
+ private static void dumpDfm(IDfm dfm) {
+ HashMap map = new HashMap();
+ dumpDfm(dfm, map, 0);
+ LinkedList list = new LinkedList();
+ Iterator it = map.entrySet().iterator();
+ while (it.hasNext()) {
+ Map.Entry entry = (Map.Entry) it.next();
+ list.add(new State((IDfm)entry.getKey(), (Integer)entry.getValue()));
+ }
+ State[] states = (State[]) list.toArray(new State[list.size()]);
+ Arrays.sort(states);
+ for (int i = 0; i < states.length; i++) {
+ print(states[i], map);
+ }
+ }
+
+ private static void print(State state, HashMap map) {
+ System.out.print(" S"+state.n.intValue()
+ +(state.dfm.isAccepting() ? "* " : " "));
+ String[] accepts = state.dfm.getAccepts();
+ for (int i = 0; i < accepts.length; i++) {
+ String accept = accepts[i];
+ IDfm next = state.dfm.advance(accept);
+ int n = ((Integer)map.get(next)).intValue();
+ System.out.print(" "+accept+"=>S"+n);
+ }
+ System.out.println();
+ }
+
+ private static int dumpDfm(IDfm dfm, HashMap map, int num) {
+ if (!map.containsKey(dfm)) {
+ map.put(dfm, new Integer(num++));
+ String[] accepts = dfm.getAccepts();
+ for (int i = 0; i < accepts.length; i++) {
+ IDfm next = dfm.advance(accepts[i]);
+ num = dumpDfm(next, map, num);
+ }
+ }
+ return num;
+ }
+
+ private static class State implements Comparable {
+ public IDfm dfm;
+ public Integer n;
+ public State(IDfm dfm, Integer n) {
+ this.dfm = dfm;
+ this.n = n;
+ }
+ /**
+ * @see java.lang.Comparable#compareTo(java.lang.Object)
+ */
+ public int compareTo(Object o) {
+ State other = (State) o;
+ return n.intValue() < other.n.intValue()
+ ? -1
+ : (n.intValue() == other.n.intValue()
+ ? 0
+ : 1);
+ }
+
+ }
+}
diff --git a/ant/org.eclipse.ant.tests.ui/Ant Editor Tests/org/eclipse/ant/tests/ui/editor/TaskDescriptionProviderTest.java b/ant/org.eclipse.ant.tests.ui/Ant Editor Tests/org/eclipse/ant/tests/ui/editor/TaskDescriptionProviderTest.java
new file mode 100644
index 000000000..a0c094ef7
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/Ant Editor Tests/org/eclipse/ant/tests/ui/editor/TaskDescriptionProviderTest.java
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ * Copyright (c) 2002, 2005 GEBIT Gesellschaft fuer EDV-Beratung
+ * und Informatik-Technologien mbH,
+ * Berlin, Duesseldorf, Frankfurt (Germany).
+ * 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:
+ * GEBIT Gesellschaft fuer EDV-Beratung und Informatik-Technologien mbH - initial implementation
+ *******************************************************************************/
+
+package org.eclipse.ant.tests.ui.editor;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.ant.tests.ui.testplugin.AbstractAntUITest;
+import org.eclipse.ant.internal.ui.editor.TaskDescriptionProvider;
+
+/**
+ * Tests the tasks description provider.
+ *
+ */
+public class TaskDescriptionProviderTest extends AbstractAntUITest {
+
+ public TaskDescriptionProviderTest(String name) {
+ super(name);
+ }
+
+ /**
+ * Tests getting the description of a task.
+ */
+ public void testGettingTaskDescription() {
+ TaskDescriptionProvider provider = TaskDescriptionProvider.getDefault();
+ String description = provider.getDescriptionForTask("apply");
+ assertNotNull(description);
+ assertTrue(description.length() > 0);
+ }
+
+ /**
+ * Tests getting the description of an attribute.
+ */
+ public void testGettingAttribute() {
+ TaskDescriptionProvider provider = TaskDescriptionProvider.getDefault();
+ String description = provider.getDescriptionForTaskAttribute("apply", "executable");
+ assertNotNull(description);
+ assertTrue(description.length() > 0);
+ }
+
+ /**
+ * Tests getting the required value of an attribute.
+ */
+ public void testGettingRequired() {
+ TaskDescriptionProvider provider = TaskDescriptionProvider.getDefault();
+ String required = provider.getRequiredAttributeForTaskAttribute("apply", "executable");
+ assertNotNull(required);
+ assertEquals("yes", required);
+ }
+
+ public static Test suite() {
+ return new TestSuite(TaskDescriptionProviderTest.class);
+ }
+}
diff --git a/ant/org.eclipse.ant.tests.ui/Ant Editor Tests/org/eclipse/ant/tests/ui/editor/formatter/FormattingPreferencesTest.java b/ant/org.eclipse.ant.tests.ui/Ant Editor Tests/org/eclipse/ant/tests/ui/editor/formatter/FormattingPreferencesTest.java
new file mode 100644
index 000000000..946a69bcb
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/Ant Editor Tests/org/eclipse/ant/tests/ui/editor/formatter/FormattingPreferencesTest.java
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2005 John-Mason P. Shackelford 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:
+ * John-Mason P. Shackelford - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.tests.ui.editor.formatter;
+
+import org.eclipse.ant.internal.ui.editor.formatter.FormattingPreferences;
+import org.eclipse.ant.tests.ui.testplugin.AbstractAntUITest;
+
+public class FormattingPreferencesTest extends AbstractAntUITest {
+
+ public FormattingPreferencesTest(String name) {
+ super(name);
+ }
+
+ public final void testGetCanonicalIndent() {
+
+ FormattingPreferences prefs;
+
+ // test spaces
+ prefs = new FormattingPreferences(){
+ public int getTabWidth() {
+ return 3;
+ }
+ public boolean useSpacesInsteadOfTabs() {
+ return true;
+ }
+ };
+ assertEquals(" ",prefs.getCanonicalIndent());
+
+ // ensure the value is not hard coded
+ prefs = new FormattingPreferences(){
+ public int getTabWidth() {
+ return 7;
+ }
+ public boolean useSpacesInsteadOfTabs() {
+ return true;
+ }
+ };
+ assertEquals(" ",prefs.getCanonicalIndent());
+
+ // use tab character
+ prefs = new FormattingPreferences(){
+ public int getTabWidth() {
+ return 7;
+ }
+ public boolean useSpacesInsteadOfTabs() {
+ return false;
+ }
+ };
+ assertEquals("\t",prefs.getCanonicalIndent());
+ }
+}
diff --git a/ant/org.eclipse.ant.tests.ui/Ant Editor Tests/org/eclipse/ant/tests/ui/editor/formatter/XmlDocumentFormatterTest.java b/ant/org.eclipse.ant.tests.ui/Ant Editor Tests/org/eclipse/ant/tests/ui/editor/formatter/XmlDocumentFormatterTest.java
new file mode 100644
index 000000000..0a007aae8
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/Ant Editor Tests/org/eclipse/ant/tests/ui/editor/formatter/XmlDocumentFormatterTest.java
@@ -0,0 +1,84 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2005 John-Mason P. Shackelford 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:
+ * John-Mason P. Shackelford - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.tests.ui.editor.formatter;
+
+import org.eclipse.ant.internal.ui.editor.formatter.FormattingPreferences;
+import org.eclipse.ant.internal.ui.editor.formatter.XmlDocumentFormatter;
+import org.eclipse.ant.tests.ui.testplugin.AbstractAntUITest;
+
+public class XmlDocumentFormatterTest extends AbstractAntUITest {
+
+ public XmlDocumentFormatterTest(String name) {
+ super(name);
+ }
+
+ /**
+ * General Test
+ */
+ public final void testGeneralFormat() throws Exception {
+ FormattingPreferences prefs = new FormattingPreferences(){
+ public int getTabWidth() {
+ return 3;
+ }
+ public boolean useSpacesInsteadOfTabs() {
+ return true;
+ }
+ };
+ simpleTest("formatTest_source01.xml","formatTest_target01.xml",prefs);
+ }
+
+ /**
+ * Insure that tab width is not hard coded
+ */
+ public final void testTabWidth() throws Exception {
+ FormattingPreferences prefs = new FormattingPreferences(){
+ public int getTabWidth() {
+ return 7;
+ }
+ public boolean useSpacesInsteadOfTabs() {
+ return true;
+ }
+ };
+ simpleTest("formatTest_source01.xml","formatTest_target02.xml",prefs);
+ }
+
+
+ /**
+ * Test with tab characters instead of spaces.
+ */
+ public final void testTabsInsteadOfSpaces() throws Exception {
+ FormattingPreferences prefs = new FormattingPreferences(){
+ public int getTabWidth() {
+ return 3;
+ }
+ public boolean useSpacesInsteadOfTabs() {
+ return false;
+ }
+ };
+ simpleTest("formatTest_source01.xml","formatTest_target03.xml",prefs);
+ }
+
+ /**
+ * @param sourceFileName - file to format
+ * @param targetFileName - the source file after a properly executed format
+ * @param prefs - given the included preference instructions
+ * @throws Exception
+ */
+ private void simpleTest(String sourceFileName, String targetFileName, FormattingPreferences prefs) throws Exception {
+
+ XmlDocumentFormatter xmlFormatter = new XmlDocumentFormatter();
+ xmlFormatter.setDefaultLineDelimiter(System.getProperty("line.separator"));
+ String result = xmlFormatter.format(getFileContentAsString(getBuildFile(sourceFileName)),prefs);
+ String expectedResult = getFileContentAsString(getBuildFile(targetFileName));
+
+ assertEquals(expectedResult, result);
+ }
+} \ No newline at end of file
diff --git a/ant/org.eclipse.ant.tests.ui/Ant Editor Tests/org/eclipse/ant/tests/ui/editor/formatter/XmlFormatterTest.java b/ant/org.eclipse.ant.tests.ui/Ant Editor Tests/org/eclipse/ant/tests/ui/editor/formatter/XmlFormatterTest.java
new file mode 100644
index 000000000..acd8fcbba
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/Ant Editor Tests/org/eclipse/ant/tests/ui/editor/formatter/XmlFormatterTest.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2005 John-Mason P. Shackelford 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:
+ * John-Mason P. Shackelford - initial API and implementation
+ * IBM Corporation - bug 84342
+ *******************************************************************************/
+package org.eclipse.ant.tests.ui.editor.formatter;
+
+import junit.framework.TestCase;
+
+import org.eclipse.ant.internal.ui.AntUIPlugin;
+import org.eclipse.ant.internal.ui.editor.formatter.FormattingPreferences;
+import org.eclipse.ant.internal.ui.editor.formatter.XmlFormatter;
+import org.eclipse.ant.internal.ui.preferences.AntEditorPreferenceConstants;
+import org.eclipse.core.runtime.Preferences;
+
+public class XmlFormatterTest extends TestCase {
+
+ public final void testFormatUsingPreferenceStore() {
+ Preferences prefs = AntUIPlugin.getDefault().getPluginPreferences();
+ prefs.setValue(AntEditorPreferenceConstants.FORMATTER_WRAP_LONG, true);
+ prefs.setValue(AntEditorPreferenceConstants.FORMATTER_MAX_LINE_LENGTH, 40);
+ prefs.setValue(AntEditorPreferenceConstants.FORMATTER_ALIGN, false);
+ prefs.setValue(AntEditorPreferenceConstants.FORMATTER_TAB_CHAR, true);
+ prefs.setValue(AntEditorPreferenceConstants.FORMATTER_TAB_SIZE, 4);
+ String lineSep= System.getProperty("line.separator");
+ String xmlDoc = "<project default=\"go\"><target name=\"go\" description=\"Demonstrate the wrapping of long tags.\"><echo>hi</echo></target></project>";
+ String formattedDoc = XmlFormatter.format(xmlDoc);
+ String expected = "<project default=\"go\">" + lineSep + "\t<target name=\"go\"" + lineSep + "\t description=\"Demonstrate the wrapping of long tags.\">" + lineSep + "\t\t<echo>hi</echo>" + lineSep + "\t</target>" + lineSep + "</project>";
+ assertEquals(expected, formattedDoc);
+ }
+
+ public final void testFormatWithPreferenceParameter() {
+ FormattingPreferences prefs = new FormattingPreferences() {
+ public boolean wrapLongTags() { return true;}
+ public int getMaximumLineWidth() { return 40;}
+ public boolean alignElementCloseChar() { return false;}
+ public boolean useSpacesInsteadOfTabs() { return true;}
+ public int getTabWidth() { return 6;}
+ };
+ String lineSep= System.getProperty("line.separator");
+ String xmlDoc = "<project default=\"go\"><target name=\"go\" description=\"Demonstrate the wrapping of long tags.\"><echo>hi</echo></target></project>";
+ String formattedDoc = XmlFormatter.format(xmlDoc, prefs);
+ String expected = "<project default=\"go\">" + lineSep + " <target name=\"go\"" + lineSep + " description=\"Demonstrate the wrapping of long tags.\">" + lineSep + " <echo>hi</echo>" + lineSep + " </target>" + lineSep + "</project>";
+ assertEquals(expected, formattedDoc);
+ }
+
+ /**
+ * Bug 84342
+ */
+ public final void testFormatMaintainingLineSeparators() {
+ FormattingPreferences prefs = new FormattingPreferences() {
+ public boolean wrapLongTags() { return true;}
+ public int getMaximumLineWidth() { return 40;}
+ public boolean alignElementCloseChar() { return false;}
+ public boolean useSpacesInsteadOfTabs() { return true;}
+ public int getTabWidth() { return 6;}
+ };
+ String lineSep= System.getProperty("line.separator");
+ String xmlDoc = "<project default=\"go\"><target name=\"go\" description=\"Demonstrate the wrapping of long tags.\"><echo>hi</echo></target>" + lineSep + lineSep + "</project>";
+ String formattedDoc = XmlFormatter.format(xmlDoc, prefs);
+ String expected = "<project default=\"go\">" + lineSep + " <target name=\"go\"" + lineSep + " description=\"Demonstrate the wrapping of long tags.\">" + lineSep + " <echo>hi</echo>" + lineSep + " </target>" + lineSep + lineSep + "</project>";
+ assertEquals(expected, formattedDoc);
+ }
+
+}
diff --git a/ant/org.eclipse.ant.tests.ui/Ant Editor Tests/org/eclipse/ant/tests/ui/editor/formatter/XmlTagFormatterTest.java b/ant/org.eclipse.ant.tests.ui/Ant Editor Tests/org/eclipse/ant/tests/ui/editor/formatter/XmlTagFormatterTest.java
new file mode 100644
index 000000000..abd3e2955
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/Ant Editor Tests/org/eclipse/ant/tests/ui/editor/formatter/XmlTagFormatterTest.java
@@ -0,0 +1,378 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2005 John-Mason P. Shackelford 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:
+ * John-Mason P. Shackelford - initial API and implementation
+ * IBM Corporation - Bug 84342
+ *******************************************************************************/
+package org.eclipse.ant.tests.ui.editor.formatter;
+
+import java.util.List;
+
+import org.eclipse.ant.internal.ui.editor.formatter.XmlTagFormatter;
+import org.eclipse.ant.internal.ui.editor.formatter.FormattingPreferences;
+import org.eclipse.ant.tests.ui.testplugin.AbstractAntUITest;
+
+public class XmlTagFormatterTest extends AbstractAntUITest {
+
+ // TODO This test is too low level and too tightly coupled to internals.
+
+ /* ---------------- Test Fixture ---------------- */
+ // In case anyone wonders why many people recommend against testing
+ // privates, I produce this example...
+ private static class InnerClassFactory extends XmlTagFormatter {
+
+ public static class ParseException extends XmlTagFormatter.ParseException {
+
+ private static final long serialVersionUID = 1L;
+
+ public ParseException(String message) {
+ super(message);
+ }
+ }
+
+ public static class Tag extends XmlTagFormatter.Tag {
+ }
+
+ public static class TagFormatter extends XmlTagFormatter.TagFormatter {
+
+ public boolean lineRequiresWrap(String line, int lineWidth,
+ int tabWidth) {
+ return super.lineRequiresWrap(line, lineWidth, tabWidth);
+ }
+
+ public int tabExpandedLineWidth(String line, int tabWidth) {
+ return super.tabExpandedLineWidth(line, tabWidth);
+ }
+
+ public String wrapTag(Tag tag, FormattingPreferences prefs,
+ String indent, String lineDelimiter) {
+ return super.wrapTag(tag, prefs, indent, lineDelimiter);
+ }
+ }
+
+ public static class TagParser extends XmlTagFormatter.TagParser {
+
+ public String getElementName(String tagText)
+ throws XmlTagFormatter.ParseException {
+ return super.getElementName(tagText);
+ }
+
+ public List getAttibutes(String elementText)
+ throws XmlTagFormatter.ParseException {
+ return super.getAttibutes(elementText);
+ }
+ }
+
+ public static Tag createTag() {
+ return new Tag();
+ }
+
+ public static TagFormatter createTagFormatter() {
+ return new TagFormatter();
+ }
+
+ public static TagParser createTagParser() {
+ return new TagParser();
+ }
+
+ public static void validateAttributePair(Object attributePair, String attribute, String value) {
+ XmlTagFormatter.AttributePair pair = (XmlTagFormatter.AttributePair) attributePair;
+ assertEquals(attribute, pair.getAttribute());
+ assertEquals(value, pair.getValue());
+ }
+ }
+
+ public XmlTagFormatterTest(String name) {
+ super(name);
+ }
+
+ private FormattingPreferences getPreferences(final boolean wrapLongTags,
+ final boolean alignCloseChar, final int maxLineWidth) {
+
+ return new FormattingPreferences() {
+
+ public boolean alignElementCloseChar() {
+ return alignCloseChar;
+ }
+
+ public boolean wrapLongTags() {
+ return wrapLongTags;
+ }
+
+ public int getMaximumLineWidth() {
+ return maxLineWidth;
+ }
+ };
+ }
+
+ private void simpleTest(String source, String target,
+ FormattingPreferences prefs, String indent, String lineDelimiter) throws Exception {
+
+ String result = XmlTagFormatter.format(source, prefs, indent, lineDelimiter);
+ assertEquals(target, result);
+ }
+
+ /* ---------------- Test Methods ---------------- */
+
+ public void testParserGetElementName() throws Exception {
+
+ InnerClassFactory.TagParser tagParser = InnerClassFactory
+ .createTagParser();
+
+ String elementFixture1 = "<myElement attribute1=\"value1\" attribute2=\"value2\" />"; //$NON-NLS-1$
+ assertEquals("myElement", tagParser.getElementName(elementFixture1)); //$NON-NLS-1$
+
+ String elementFixture2 = "<myElement\t\nattribute1=\"value1\" attribute2=\"value2\" />"; //$NON-NLS-1$
+ assertEquals("myElement", tagParser.getElementName(elementFixture2)); //$NON-NLS-1$
+
+ assertEquals("x", tagParser.getElementName("<x/>")); //$NON-NLS-1$ //$NON-NLS-2$
+ assertEquals("x", tagParser.getElementName("<x>")); //$NON-NLS-1$ //$NON-NLS-2$
+ assertEquals("x:y", tagParser.getElementName("<x:y/>")); //$NON-NLS-1$ //$NON-NLS-2$
+ assertEquals("x:y", tagParser.getElementName("<x:y abc/>")); //$NON-NLS-1$ //$NON-NLS-2$
+
+ Exception e1 = null;
+ try {
+ tagParser.getElementName("<>"); //$NON-NLS-1$
+ } catch (Exception e) {
+ e1 = e;
+ }
+ assertNotNull(e1);
+ assertTrue(e1.getClass().isAssignableFrom(
+ InnerClassFactory.ParseException.class));
+
+ Exception e2 = null;
+ try {
+ tagParser.getElementName("<>"); //$NON-NLS-1$
+ } catch (Exception e) {
+ e2 = e;
+ }
+ assertNotNull(e2);
+ assertTrue(e2.getClass().isAssignableFrom(
+ InnerClassFactory.ParseException.class));
+
+ }
+
+ public void testParserGetAttributes() throws Exception {
+ InnerClassFactory.TagParser tagParser = InnerClassFactory
+ .createTagParser();
+
+ List attributePairs;
+
+ // test normal situation
+ attributePairs = tagParser
+ .getAttibutes("<myElement attribute1=\"value1\" attribute2=\"value2\" />"); //$NON-NLS-1$
+
+ assertEquals(2, attributePairs.size());
+ InnerClassFactory.validateAttributePair(attributePairs.get(0),
+ "attribute1", "value1"); //$NON-NLS-1$ //$NON-NLS-2$
+ InnerClassFactory.validateAttributePair(attributePairs.get(1),
+ "attribute2", "value2"); //$NON-NLS-1$ //$NON-NLS-2$
+
+
+ // test with extra whitespace and funny quotes
+ attributePairs = tagParser
+ .getAttibutes("<myElement \nattribute1 = 'value1\"'\nattribute2\t=\"value2'\" />"); //$NON-NLS-1$
+
+ assertEquals(2, attributePairs.size());
+ InnerClassFactory.validateAttributePair(attributePairs.get(0),
+ "attribute1", "value1\""); //$NON-NLS-1$ //$NON-NLS-2$
+ InnerClassFactory.validateAttributePair(attributePairs.get(1),
+ "attribute2", "value2'"); //$NON-NLS-1$ //$NON-NLS-2$
+
+// TODO attributes which contain whitespace should throw a parse error
+//
+// // test parse errors - whitespace in attribute name
+// Exception e1 = null;
+// try {
+// attributePairs = tagParser
+// .getAttibutes("<myElement at tribute1 = \"value1\" attribute2=\"value2\" />");
+// } catch (Exception e) {
+// e1 = e;
+// }
+// assertNotNull(e1);
+// assertTrue(e1.getClass().isAssignableFrom(
+// InnerClassFactory.ParseException.class));
+
+
+ // test parse errors - equals in the wrong place
+ Exception e2 = null;
+ try {
+ attributePairs = tagParser
+ .getAttibutes("<myElement attribute1=\"value1\" = attribute2=\"value2\" />"); //$NON-NLS-1$
+ } catch (Exception e) {
+ e2 = e;
+ }
+ assertNotNull(e2);
+ assertTrue(e2.getClass().isAssignableFrom(
+ InnerClassFactory.ParseException.class));
+
+
+ // test parse errors - quotes in the wrong place
+ Exception e3 = null;
+ try {
+ attributePairs = tagParser
+ .getAttibutes("<myElement attribute1=\"\"value1\" attribute2=\"value2\" />"); //$NON-NLS-1$
+ } catch (Exception e) {
+ e3 = e;
+ }
+ assertNotNull(e3);
+ assertTrue(e3.getClass().isAssignableFrom(InnerClassFactory.ParseException.class));
+ }
+
+ public void testFormat01() throws Exception {
+ String lineSep= System.getProperty("line.separator");
+ String indent = "\t"; //$NON-NLS-1$
+ String source = "<target name=\"myTargetName\" depends=\"a,b,c,d,e,f,g\" description=\"This is a very long element which ought to be wrapped.\">"; //$NON-NLS-1$
+ String target = "<target name=\"myTargetName\"" + lineSep //$NON-NLS-1$
+ + indent
+ + " depends=\"a,b,c,d,e,f,g\"" + lineSep //$NON-NLS-1$
+ + indent
+ + " description=\"This is a very long element which ought to be wrapped.\">"; //$NON-NLS-1$
+
+ simpleTest(source, target, getPreferences(true, false, 60), indent, lineSep);
+ }
+
+ public void testFormat02() throws Exception {
+ String lineSep= System.getProperty("line.separator");
+ String indent = "\t"; //$NON-NLS-1$
+ String source = "<target name=\"myTargetName\" depends=\"a,b,c,d,e,f,g\" description=\"This is a very long element which ought to be wrapped.\">"; //$NON-NLS-1$
+ String target = "<target name=\"myTargetName\"" + lineSep //$NON-NLS-1$
+ + indent
+ + " depends=\"a,b,c,d,e,f,g\"" + lineSep //$NON-NLS-1$
+ + indent
+ + " description=\"This is a very long element which ought to be wrapped.\"" + lineSep //$NON-NLS-1$
+ + indent + ">"; //$NON-NLS-1$
+
+ simpleTest(source, target, getPreferences(true, true, 60), indent, lineSep);
+ }
+
+ public void testBug73411() throws Exception {
+ String lineSep= System.getProperty("line.separator");
+ String indent = "\t"; //$NON-NLS-1$
+ String source = "<target name='myTargetName' depends=\"a,b,c,d,e,f,g\" description=\'This is a very long element which ought to be \"wrapped\".'>"; //$NON-NLS-1$
+ String target = "<target name='myTargetName'" + lineSep //$NON-NLS-1$
+ + indent
+ + " depends=\"a,b,c,d,e,f,g\"" + lineSep //$NON-NLS-1$
+ + indent
+ + " description='This is a very long element which ought to be \"wrapped\".'" + lineSep //$NON-NLS-1$
+ + indent + ">"; //$NON-NLS-1$
+
+ simpleTest(source, target, getPreferences(true, true, 60), indent, lineSep);
+ }
+
+ public void testLineRequiresWrap() throws Exception {
+
+ InnerClassFactory.TagFormatter tagFormatter = InnerClassFactory.createTagFormatter();
+
+ boolean shouldWrap = tagFormatter.lineRequiresWrap(
+ "\t\t <myElement attribute1=\"value1\" attribute2=\"value2\" />", //$NON-NLS-1$
+ 70, 8);
+ boolean shouldNotWrap = tagFormatter.lineRequiresWrap(
+ "\t\t <myElement attribute1=\"value1\" attribute2=\"value2\" />", //$NON-NLS-1$
+ 70, 8);
+ assertTrue(shouldWrap);
+ assertTrue(!shouldNotWrap);
+
+ }
+
+ public void testTabExpandedLineWidth() throws Exception {
+
+ InnerClassFactory.TagFormatter tagFormatter = InnerClassFactory.createTagFormatter();
+
+ assertEquals(20, tagFormatter.tabExpandedLineWidth("\t 1234567890", 8)); //$NON-NLS-1$
+ assertEquals(10, tagFormatter.tabExpandedLineWidth("1234567890", 8)); //$NON-NLS-1$
+ assertEquals(19, tagFormatter.tabExpandedLineWidth("\t1\t2 34567890", 3)); //$NON-NLS-1$
+ }
+
+ public void testTabToStringAndMinimumLength() throws Exception {
+ InnerClassFactory.Tag tag = InnerClassFactory.createTag();
+
+ tag.setElementName("myElement"); //$NON-NLS-1$
+ tag.setClosed(false);
+ assertEquals("<myElement>", tag.toString()); //$NON-NLS-1$
+ assertEquals(tag.toString().length(), tag.minimumLength());
+
+ tag.setClosed(true);
+ assertEquals("<myElement />", tag.toString()); //$NON-NLS-1$
+ assertEquals(tag.toString().length(), tag.minimumLength());
+
+ tag.addAttribute("attribute1", "value1", '"'); //$NON-NLS-1$ //$NON-NLS-2$
+ tag.addAttribute("attribute2", "value2", '"'); //$NON-NLS-1$ //$NON-NLS-2$
+ assertEquals(
+ "<myElement attribute1=\"value1\" attribute2=\"value2\" />", //$NON-NLS-1$
+ tag.toString());
+ assertEquals(tag.toString().length(), tag.minimumLength());
+
+ tag.setClosed(false);
+ assertEquals("<myElement attribute1=\"value1\" attribute2=\"value2\">", //$NON-NLS-1$
+ tag.toString());
+ assertEquals(tag.toString().length(), tag.minimumLength());
+ }
+
+ public void testWrapTag() throws Exception {
+
+ InnerClassFactory.Tag tag = InnerClassFactory.createTag();
+
+ InnerClassFactory.TagFormatter tagFormatter = InnerClassFactory
+ .createTagFormatter();
+
+ FormattingPreferences dontAlignCloseChar = new FormattingPreferences() {
+
+ public boolean alignElementCloseChar() {
+ return false;
+ }
+ };
+ FormattingPreferences doAlignCloseChar = new FormattingPreferences() {
+
+ public boolean alignElementCloseChar() {
+ return true;
+ }
+ };
+
+ tag.setElementName("myElement"); //$NON-NLS-1$
+ tag.addAttribute("attribute1", "value1", '"'); //$NON-NLS-1$ //$NON-NLS-2$
+ tag.addAttribute("attribute2", "value2", '"'); //$NON-NLS-1$ //$NON-NLS-2$
+
+ tag.setClosed(true);
+
+ String lineSep= System.getProperty("line.separator");
+ assertEquals("<myElement attribute1=\"value1\"" + lineSep //$NON-NLS-1$
+ + "\t\t attribute2=\"value2\" />", tagFormatter //$NON-NLS-1$
+ .wrapTag(tag, dontAlignCloseChar, "\t\t ", lineSep)); //$NON-NLS-1$
+
+ assertEquals("<myElement attribute1=\"value1\"" + lineSep //$NON-NLS-1$
+ + "\t\t attribute2=\"value2\"" + lineSep + "\t\t />", //$NON-NLS-1$
+ tagFormatter.wrapTag(tag, doAlignCloseChar, "\t\t ", lineSep)); //$NON-NLS-1$
+
+ tag.setClosed(false);
+
+ assertEquals("<myElement attribute1=\"value1\"" + lineSep //$NON-NLS-1$
+ + "\t\t attribute2=\"value2\">", tagFormatter //$NON-NLS-1$
+ .wrapTag(tag, dontAlignCloseChar, "\t\t ", lineSep)); //$NON-NLS-1$
+
+ assertEquals("<myElement attribute1=\"value1\"" + lineSep //$NON-NLS-1$
+ + "\t\t attribute2=\"value2\"" + lineSep + "\t\t >", //$NON-NLS-1$
+ tagFormatter.wrapTag(tag, doAlignCloseChar, "\t\t ", lineSep)); //$NON-NLS-1$
+
+ }
+
+ public void testBug63558() throws Exception {
+
+ // Ordinarily the double space after the element name would be repaired
+ // but if the formatter is working correctly these examples will be
+ // considered malformed and will be passed through untouched.
+ String lineSep= System.getProperty("line.separator");
+ String source1 = "<echo file=\"foo\">" + lineSep + "&lt;html>&lt;body>&lt;pre>" //$NON-NLS-1$
+ + "${compilelog}&lt;/pre>&lt;/body>&lt;/html>"; //$NON-NLS-1$
+ FormattingPreferences prefs = getPreferences(true, false, 60); //$NON-NLS-1$
+ simpleTest(source1, source1, prefs, "\t", lineSep);
+
+ String source2 = "<echo file=\"foo\"/bar/baz></echo>"; //$NON-NLS-1$
+ simpleTest(source2, source2, prefs, "\t", lineSep);
+ }
+}
diff --git a/ant/org.eclipse.ant.tests.ui/Ant Editor Tests/org/eclipse/ant/tests/ui/editor/performance/EditorTestHelper.java b/ant/org.eclipse.ant.tests.ui/Ant Editor Tests/org/eclipse/ant/tests/ui/editor/performance/EditorTestHelper.java
new file mode 100644
index 000000000..5196cd722
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/Ant Editor Tests/org/eclipse/ant/tests/ui/editor/performance/EditorTestHelper.java
@@ -0,0 +1,148 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2007 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.tests.ui.editor.performance;
+
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.jobs.IJobManager;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.ide.IDE;
+import org.eclipse.ui.texteditor.IDocumentProvider;
+import org.eclipse.ui.texteditor.ITextEditor;
+
+
+/**
+ * @since 3.1
+ */
+public class EditorTestHelper {
+
+ public static IEditorPart openInEditor(IFile file, boolean runEventLoop) throws PartInitException {
+ IEditorPart part= IDE.openEditor(getActivePage(), file);
+ if (runEventLoop)
+ runEventQueue(part);
+ return part;
+ }
+
+ public static IEditorPart openInEditor(IFile file, String editorId, boolean runEventLoop) throws PartInitException {
+ IEditorPart part= IDE.openEditor(getActivePage(), file, editorId);
+ if (runEventLoop)
+ runEventQueue(part);
+ return part;
+ }
+
+ public static IDocument getDocument(ITextEditor editor) {
+ IDocumentProvider provider= editor.getDocumentProvider();
+ IEditorInput input= editor.getEditorInput();
+ return provider.getDocument(input);
+ }
+
+ public static void revertEditor(ITextEditor editor, boolean runEventQueue) {
+ editor.doRevertToSaved();
+ if (runEventQueue)
+ runEventQueue(editor);
+ }
+
+ public static void closeAllEditors() {
+ IWorkbenchPage page= getActivePage();
+ if (page != null)
+ page.closeAllEditors(false);
+ }
+
+ public static void runEventQueue() {
+ IWorkbenchWindow window= getActiveWorkbenchWindow();
+ if (window != null)
+ runEventQueue(window.getShell());
+ }
+
+ public static void runEventQueue(IWorkbenchPart part) {
+ runEventQueue(part.getSite().getShell());
+ }
+
+ public static void runEventQueue(Shell shell) {
+ while (shell.getDisplay().readAndDispatch());
+ }
+
+ public static void runEventQueue(long minTime) {
+ long nextCheck= System.currentTimeMillis() + minTime;
+ while (System.currentTimeMillis() < nextCheck) {
+ runEventQueue();
+ sleep(1);
+ }
+ }
+
+ public static IWorkbenchWindow getActiveWorkbenchWindow() {
+ return PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+ }
+
+ public static IWorkbenchPage getActivePage() {
+ IWorkbenchWindow window= getActiveWorkbenchWindow();
+ return window != null ? window.getActivePage() : null;
+ }
+
+ public static Display getActiveDisplay() {
+ IWorkbenchWindow window= getActiveWorkbenchWindow();
+ return window != null ? window.getShell().getDisplay() : null;
+ }
+
+ public static boolean calmDown(long minTime, long maxTime, long intervalTime) {
+ long startTime= System.currentTimeMillis() + minTime;
+ runEventQueue();
+ while (System.currentTimeMillis() < startTime)
+ runEventQueue(intervalTime);
+
+ long endTime= maxTime > 0 ? System.currentTimeMillis() + maxTime : Long.MAX_VALUE;
+ boolean calm= isCalm();
+ while (!calm && System.currentTimeMillis() < endTime) {
+ runEventQueue(intervalTime);
+ calm= isCalm();
+ }
+// System.out.println("--------------------------------------------------");
+ return calm;
+ }
+
+ public static void sleep(int intervalTime) {
+ try {
+ Thread.sleep(intervalTime);
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+
+ public static boolean isCalm() {
+ IJobManager jobManager= Job.getJobManager();
+ Job[] jobs= jobManager.find(null);
+ for (int i= 0; i < jobs.length; i++) {
+ Job job= jobs[i];
+ int state= job.getState();
+// System.out.println(job.getName() + ": " + getStateName(state));
+ if (state == Job.RUNNING || state == Job.WAITING) {
+// System.out.println();
+ return false;
+ }
+ }
+// System.out.println();
+ return true;
+ }
+
+ public static void bringToTop() {
+ getActiveWorkbenchWindow().getShell().forceActive();
+ }
+}
diff --git a/ant/org.eclipse.ant.tests.ui/Ant Editor Tests/org/eclipse/ant/tests/ui/editor/performance/NonInitialTypingTest.java b/ant/org.eclipse.ant.tests.ui/Ant Editor Tests/org/eclipse/ant/tests/ui/editor/performance/NonInitialTypingTest.java
new file mode 100644
index 000000000..ec9b947fa
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/Ant Editor Tests/org/eclipse/ant/tests/ui/editor/performance/NonInitialTypingTest.java
@@ -0,0 +1,94 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 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:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.ant.tests.ui.editor.performance;
+
+import org.eclipse.ant.tests.ui.testplugin.AbstractAntUITest;
+
+/**
+ * Measures the time to type in one single target into a large buildfile
+ * @since 3.1
+ */
+public class NonInitialTypingTest extends AbstractAntUITest {
+
+ public NonInitialTypingTest(String name) {
+ super(name);
+ }
+
+// private ITextEditor fEditor;
+//
+// private static final char[] TARGET= ("<target name=\"newTarget\" >\r" +
+// "<echo>\"New Target\"</echo>\r" +
+// "</target>\r").toCharArray();
+//
+// private PerformanceMeter fMeter;
+//
+// private KeyboardProbe fKeyboardProbe;
+//
+// protected void setUp() throws PartInitException, BadLocationException {
+// EditorTestHelper.runEventQueue();
+// IFile file= getProject().getFolder("buildfiles").getFolder("performance").getFile("build.xml");
+// fEditor= (ITextEditor) EditorTestHelper.openInEditor(file, true);
+// // dirty editor to avoid initial dirtying / validate edit costs
+// dirtyEditor();
+// Performance performance= Performance.getDefault();
+// fMeter= performance.createPerformanceMeter(performance.getDefaultScenarioId(this));
+// fKeyboardProbe= new KeyboardProbe();
+//
+// int offset= getInsertPosition();
+// fEditor.getSelectionProvider().setSelection(new TextSelection(offset, 0));
+// EditorTestHelper.runEventQueue();
+// sleep(1000);
+// }
+//
+// private void dirtyEditor() {
+// fEditor.getSelectionProvider().setSelection(new TextSelection(0, 0));
+// EditorTestHelper.runEventQueue();
+// sleep(1000);
+//
+// Display display= EditorTestHelper.getActiveDisplay();
+// fKeyboardProbe.pressChar('{', display);
+// SWTEventHelper.pressKeyCode(display, SWT.BS);
+// sleep(1000);
+// }
+//
+// protected void tearDown() throws Exception {
+// sleep(1000);
+// EditorTestHelper.revertEditor(fEditor, true);
+// EditorTestHelper.closeAllEditors();
+//
+// fMeter.commit();
+// }
+//
+// public void testTypeAMethod() {
+// Display display= EditorTestHelper.getActiveDisplay();
+//
+// fMeter.start();
+// for (int i= 0; i < TARGET.length; i++) {
+// fKeyboardProbe.pressChar(TARGET[i], display);
+// }
+// fMeter.stop();
+// }
+//
+// private synchronized void sleep(int time) {
+// try {
+// wait(time);
+// } catch (InterruptedException e) {
+// }
+// }
+//
+// private int getInsertPosition() throws BadLocationException {
+// IDocument document= EditorTestHelper.getDocument(fEditor);
+// int lines= document.getNumberOfLines();
+// int offset= document.getLineOffset(lines - 2);
+// return offset;
+// }
+}
diff --git a/ant/org.eclipse.ant.tests.ui/Ant Editor Tests/org/eclipse/ant/tests/ui/editor/support/TestLocationProvider.java b/ant/org.eclipse.ant.tests.ui/Ant Editor Tests/org/eclipse/ant/tests/ui/editor/support/TestLocationProvider.java
new file mode 100644
index 000000000..7f7c6087e
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/Ant Editor Tests/org/eclipse/ant/tests/ui/editor/support/TestLocationProvider.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2003, 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:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.ant.tests.ui.editor.support;
+
+import java.io.File;
+
+import org.eclipse.ant.internal.ui.model.LocationProvider;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+
+
+public class TestLocationProvider extends LocationProvider {
+
+ private File buildFile;
+
+ public TestLocationProvider(File buildFile) {
+ super(null);
+ this.buildFile= buildFile;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ant.internal.ui.editor.outline.ILocationProvider#getLocation()
+ */
+ public IPath getLocation() {
+ return new Path(buildFile.getAbsolutePath());
+ }
+}
diff --git a/ant/org.eclipse.ant.tests.ui/Ant Editor Tests/org/eclipse/ant/tests/ui/editor/support/TestProblemRequestor.java b/ant/org.eclipse.ant.tests.ui/Ant Editor Tests/org/eclipse/ant/tests/ui/editor/support/TestProblemRequestor.java
new file mode 100644
index 000000000..db678daa3
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/Ant Editor Tests/org/eclipse/ant/tests/ui/editor/support/TestProblemRequestor.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2003, 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:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.ant.tests.ui.editor.support;
+
+import org.eclipse.ant.internal.ui.model.IProblem;
+import org.eclipse.ant.internal.ui.model.IProblemRequestor;
+
+public class TestProblemRequestor implements IProblemRequestor {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ant.internal.ui.editor.outline.IProblemRequestor#acceptProblem(org.eclipse.ant.internal.ui.editor.outline.IProblem)
+ */
+ public void acceptProblem(IProblem problem) {
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ant.internal.ui.editor.outline.IProblemRequestor#beginReporting()
+ */
+ public void beginReporting() {
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ant.internal.ui.editor.outline.IProblemRequestor#endReporting()
+ */
+ public void endReporting() {
+
+ }
+}
diff --git a/ant/org.eclipse.ant.tests.ui/Ant Editor Tests/org/eclipse/ant/tests/ui/editor/support/TestTextCompletionProcessor.java b/ant/org.eclipse.ant.tests.ui/Ant Editor Tests/org/eclipse/ant/tests/ui/editor/support/TestTextCompletionProcessor.java
new file mode 100644
index 000000000..5b611ad3f
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/Ant Editor Tests/org/eclipse/ant/tests/ui/editor/support/TestTextCompletionProcessor.java
@@ -0,0 +1,224 @@
+/*******************************************************************************
+ * Copyright (c) 2003, 2006 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.tests.ui.editor.support;
+
+import java.io.File;
+import java.io.IOException;
+
+import junit.framework.Assert;
+
+import org.eclipse.ant.internal.ui.editor.AntEditor;
+import org.eclipse.ant.internal.ui.editor.AntEditorCompletionProcessor;
+import org.eclipse.ant.internal.ui.model.AntModel;
+import org.eclipse.jface.text.Document;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.contentassist.ICompletionListener;
+import org.eclipse.jface.text.contentassist.ICompletionProposal;
+import org.eclipse.jface.text.contentassist.IContentAssistantExtension2;
+import org.eclipse.jface.text.source.ISourceViewer;
+import org.w3c.dom.Element;
+
+public class TestTextCompletionProcessor extends AntEditorCompletionProcessor {
+
+ public final static int TEST_PROPOSAL_MODE_NONE = AntEditorCompletionProcessor.PROPOSAL_MODE_NONE;
+ public final static int TEST_PROPOSAL_MODE_BUILDFILE = AntEditorCompletionProcessor.PROPOSAL_MODE_BUILDFILE;
+ public final static int TEST_PROPOSAL_MODE_TASK_PROPOSAL = AntEditorCompletionProcessor.PROPOSAL_MODE_TASK_PROPOSAL;
+ public final static int TEST_PROPOSAL_MODE_PROPERTY_PROPOSAL = AntEditorCompletionProcessor.PROPOSAL_MODE_PROPERTY_PROPOSAL;
+ public final static int TEST_PROPOSAL_MODE_ATTRIBUTE_PROPOSAL = AntEditorCompletionProcessor.PROPOSAL_MODE_ATTRIBUTE_PROPOSAL;
+ public final static int TEST_PROPOSAL_MODE_TASK_PROPOSAL_CLOSING = AntEditorCompletionProcessor.PROPOSAL_MODE_TASK_PROPOSAL_CLOSING;
+ public final static int TEST_PROPOSAL_MODE_ATTRIBUTE_VALUE_PROPOSAL = AntEditorCompletionProcessor.PROPOSAL_MODE_ATTRIBUTE_VALUE_PROPOSAL;
+
+ private File fEditedFile;
+ private ISourceViewer fViewer;
+ private boolean fNeedsToDispose= true;
+
+
+
+ public TestTextCompletionProcessor(AntModel model) {
+ super(model);
+ fContentAssistant= new IContentAssistantExtension2() {
+ public void setEmptyMessage(String message) {
+ }
+
+ public void setStatusMessage(String message) {
+ }
+
+ public void setStatusLineVisible(boolean show) {
+ }
+
+ public void setShowEmptyList(boolean showEmpty) {
+ }
+
+ public void setRepeatedInvocationMode(boolean cycling) {
+ }
+
+ public void removeCompletionListener(ICompletionListener listener) {
+ }
+
+ public void addCompletionListener(ICompletionListener listener) {
+
+ }
+ };
+ }
+
+ public TestTextCompletionProcessor(AntEditor editor) {
+ this(editor.getAntModel());
+ fViewer= editor.getViewer();
+ fNeedsToDispose= false;
+ }
+
+ public TestTextCompletionProcessor() {
+ this((AntModel)null);
+ }
+
+ public ICompletionProposal[] getAttributeProposals(String taskName, String prefix) {
+ if (cursorPosition == -1) {
+ cursorPosition= taskName.length();
+ }
+ return super.getAttributeProposals(taskName, prefix);
+ }
+
+ public Element findChildElementNamedOf(Element anElement, String childElementName) {
+ return super.findChildElementNamedOf(anElement, childElementName);
+ }
+
+ public ICompletionProposal[] getTaskProposals(String text, String parentName, String prefix) {
+ cursorPosition= Math.max(0, text.length() - 1);
+ return super.getTaskProposals(new Document(text), parentName, prefix);
+ }
+
+ public ICompletionProposal[] getTaskProposals(IDocument document, String parentName, String aPrefix) {
+ cursorPosition= Math.max(0, document.getLength() - 1);
+ return super.getTaskProposals(document, parentName, aPrefix);
+ }
+
+ public int determineProposalMode(String text, int theCursorPosition, String prefix) {
+ return super.determineProposalMode(new Document(text), theCursorPosition, prefix);
+ }
+
+ public String getParentName(String text, int aLineNumber, int aColumnNumber) {
+ return super.getParentName(new Document(text), aLineNumber, aColumnNumber);
+ }
+
+ public String getParentName(IDocument doc, int aLineNumber, int aColumnNumber) {
+ return super.getParentName(doc, aLineNumber, aColumnNumber);
+ }
+
+ public String getPrefixFromDocument(String aDocumentText, int anOffset) {
+ String prefix= super.getPrefixFromDocument(aDocumentText, anOffset);
+ currentPrefix= null;
+ return prefix;
+ }
+
+ public ICompletionProposal[] getPropertyProposals(IDocument document, String prefix, int cursorPos) {
+ return super.getPropertyProposals(document, prefix, cursorPos);
+ }
+
+ /**
+ * Returns the edited File that org.eclipse.ant.internal.ui.editor.AntEditorCompletionProcessor sets or a temporary
+ * file, which only serves as a dummy.
+ * @see org.eclipse.ant.internal.ui.editor.AntEditorCompletionProcessor#getEditedFile()
+ */
+ public File getEditedFile() {
+ if (fEditedFile != null){
+ return fEditedFile;
+ }
+ File tempFile = null;
+ try {
+ tempFile = File.createTempFile("test", null);
+ } catch (IOException e) {
+ Assert.fail(e.getMessage());
+ }
+ tempFile.deleteOnExit();
+ return tempFile;
+ }
+
+ public void setLineNumber(int aLineNumber) {
+ lineNumber = aLineNumber;
+ }
+
+ public void setColumnNumber(int aColumnNumber) {
+ columnNumber = aColumnNumber;
+ }
+
+ public void setCursorPosition(int cursorPosition) {
+ this.cursorPosition = cursorPosition;
+ }
+
+ public void setEditedFile(File aFile) {
+ fEditedFile= aFile;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ant.internal.ui.editor.AntEditorCompletionProcessor#getTargetAttributeValueProposals(org.eclipse.jface.text.IDocument, java.lang.String, java.lang.String, java.lang.String)
+ */
+ public ICompletionProposal[] getTargetAttributeValueProposals(IDocument document, String textToSearch, String prefix, String attributeName) {
+ return super.getTargetAttributeValueProposals(document, textToSearch, prefix, attributeName);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ant.internal.ui.editor.AntEditorCompletionProcessor#getAntCallAttributeValueProposals(org.eclipse.jface.text.IDocument, java.lang.String, java.lang.String)
+ */
+ public ICompletionProposal[] getAntCallAttributeValueProposals(IDocument document, String prefix, String attributeName) {
+ return super.getAntCallAttributeValueProposals(document, prefix, attributeName);
+ }
+ /**
+ * Since the testing occurs without necessarily having an associated viewer, return
+ * a dummy value.
+ */
+ protected char getPreviousChar() {
+ return '?';
+ }
+
+ /**
+ * Returns whether the specified task name is known.
+ */
+ protected boolean isKnownElement(String elementName) {
+ if (antModel != null) {
+ return super.isKnownElement(elementName);
+ }
+ return getDtd().getElement(elementName) != null ;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ant.internal.ui.editor.AntEditorCompletionProcessor#getProposalsFromDocument(org.eclipse.jface.text.IDocument, java.lang.String)
+ */
+ public ICompletionProposal[] getProposalsFromDocument(IDocument document, String prefix) {
+ return super.getProposalsFromDocument(document, prefix);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ant.internal.ui.editor.AntEditorCompletionProcessor#getBuildFileProposals(org.eclipse.jface.text.IDocument, java.lang.String)
+ */
+ public ICompletionProposal[] getBuildFileProposals(String text, String prefix) {
+ return super.getBuildFileProposals(new Document(text), prefix);
+ }
+ /* (non-Javadoc)
+ * @see org.eclipse.ant.internal.ui.editor.AntEditorCompletionProcessor#determineTemplateProposals(org.eclipse.jface.text.ITextViewer, int)
+ */
+ public ICompletionProposal[] determineTemplateProposals() {
+ return super.determineTemplateProposals(fViewer, cursorPosition);
+ }
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#computeCompletionProposals(org.eclipse.jface.text.ITextViewer, int)
+ */
+ public ICompletionProposal[] computeCompletionProposals(int documentOffset) {
+ return super.computeCompletionProposals(fViewer, documentOffset);
+ }
+
+ public void dispose() {
+ if (fNeedsToDispose && antModel != null) {
+ //not working with an editor
+ antModel.dispose();
+ }
+ }
+}
diff --git a/ant/org.eclipse.ant.tests.ui/Ant Tests/org/eclipse/ant/tests/ui/AbstractAntUIBuildPerformanceTest.java b/ant/org.eclipse.ant.tests.ui/Ant Tests/org/eclipse/ant/tests/ui/AbstractAntUIBuildPerformanceTest.java
new file mode 100644
index 000000000..974792034
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/Ant Tests/org/eclipse/ant/tests/ui/AbstractAntUIBuildPerformanceTest.java
@@ -0,0 +1,143 @@
+/*******************************************************************************
+ * 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:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.tests.ui;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.test.performance.Dimension;
+import org.eclipse.test.performance.Performance;
+import org.eclipse.test.performance.PerformanceMeter;
+
+public class AbstractAntUIBuildPerformanceTest extends AbstractAntUIBuildTest {
+
+ protected PerformanceMeter fPerformanceMeter;
+
+ /**
+ * Constructs a performance test case with the given name.
+ * @param name the name of the performance test case
+ */
+ public AbstractAntUIBuildPerformanceTest(String name) {
+ super(name);
+ }
+
+ /**
+ * Overridden to create a default performance meter for this test case.
+ * @throws Exception
+ */
+ protected void setUp() throws Exception {
+ super.setUp();
+ Performance performance= Performance.getDefault();
+ fPerformanceMeter= performance.createPerformanceMeter(performance.getDefaultScenarioId(this));
+ }
+
+ /**
+ * Overridden to dispose of the performance meter.
+ * @throws Exception
+ */
+ protected void tearDown() throws Exception {
+ fPerformanceMeter.dispose();
+ }
+
+ /**
+ * Mark the scenario of this test case
+ * to be included into the global performance summary. The summary shows
+ * the given dimension of the scenario and labels the scenario with the short name.
+ *
+ * @param shortName a short (shorter than 40 characters) descritive name of the scenario
+ * @param dimension the dimension to show in the summary
+ */
+ public void tagAsGlobalSummary(String shortName, Dimension dimension) {
+ Performance performance= Performance.getDefault();
+ performance.tagAsGlobalSummary(fPerformanceMeter, shortName, new Dimension[] { dimension } );
+ }
+
+ /**
+ * Mark the scenario of this test case
+ * to be included into the performance summary. The summary shows
+ * the given dimension of the scenario and labels the scenario with the short name.
+ *
+ * @param shortName a short (shorter than 40 characters) descriptive name of the scenario
+ * @param dimension the dimension to show in the summary
+ */
+ public void tagAsSummary(String shortName, Dimension dimension) {
+ Performance performance= Performance.getDefault();
+ performance.tagAsSummary(fPerformanceMeter, shortName, new Dimension[] { dimension } );
+ }
+
+ /**
+ * Mark the scenario represented by the given PerformanceMeter
+ * to be included into the global performance summary. The summary shows
+ * the given dimensions of the scenario and labels the scenario with the short name.
+ *
+ * @param shortName a short (shorter than 40 characters) descriptive name of the scenario
+ * @param dimensions an array of dimensions to show in the summary
+ */
+ public void tagAsGlobalSummary(String shortName, Dimension[] dimensions) {
+ Performance performance= Performance.getDefault();
+ performance.tagAsGlobalSummary(fPerformanceMeter, shortName, dimensions );
+ }
+
+ /**
+ * Called from within a test case immediately before the code to measure is run.
+ * It starts capturing of performance data.
+ * Must be followed by a call to {@link PerformanceTestCase#stopMeasuring()} before subsequent calls
+ * to this method or {@link PerformanceTestCase#commitMeasurements()}.
+ */
+ protected void startMeasuring() {
+ fPerformanceMeter.start();
+ }
+
+ protected void stopMeasuring() {
+ fPerformanceMeter.stop();
+ }
+
+ protected void commitMeasurements() {
+ fPerformanceMeter.commit();
+ }
+
+ /**
+ * Asserts default properties of the measurements captured for this test case.
+ *
+ * @throws RuntimeException if the properties do not hold
+ */
+ protected void assertPerformance() {
+ Performance.getDefault().assertPerformance(fPerformanceMeter);
+ }
+
+ /**
+ * Asserts that the measurement specified by the given dimension
+ * is within a certain range with respect to some reference value.
+ * If the specified dimension isn't available, the call has no effect.
+ *
+ * @param dim the Dimension to check
+ * @param lowerPercentage a negative number indicating the percentage the measured value is allowed to be smaller than some reference value
+ * @param upperPercentage a positive number indicating the percentage the measured value is allowed to be greater than some reference value
+ * @throws RuntimeException if the properties do not hold
+ */
+ protected void assertPerformanceInRelativeBand(Dimension dim, int lowerPercentage, int upperPercentage) {
+ Performance.getDefault().assertPerformanceInRelativeBand(fPerformanceMeter, dim, lowerPercentage, upperPercentage);
+ }
+
+ /**
+ * Launches the Ant build for this config.
+ * Waits for all of the lines to be appended to the console.
+ *
+ * @param config the launch configuration to execute
+ * @param i the number of times to perform the launch
+ */
+ protected void launch(ILaunchConfiguration config, int i) throws CoreException {
+ startMeasuring();
+ for (int j = 0; j < i; j++) {
+ super.launch(config);
+ }
+ stopMeasuring();
+ }
+}
diff --git a/ant/org.eclipse.ant.tests.ui/Ant Tests/org/eclipse/ant/tests/ui/AbstractAntUIBuildTest.java b/ant/org.eclipse.ant.tests.ui/Ant Tests/org/eclipse/ant/tests/ui/AbstractAntUIBuildTest.java
new file mode 100644
index 000000000..8e4eca7a5
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/Ant Tests/org/eclipse/ant/tests/ui/AbstractAntUIBuildTest.java
@@ -0,0 +1,100 @@
+/*******************************************************************************
+ * Copyright (c) 2003, 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:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.ant.tests.ui;
+
+import junit.framework.TestResult;
+
+import org.eclipse.ant.tests.ui.testplugin.AbstractAntUITest;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.console.IHyperlink;
+
+
+public abstract class AbstractAntUIBuildTest extends AbstractAntUITest {
+
+ /**
+ * Flag that indicates test are in progress
+ */
+ protected boolean testing = true;
+
+ public AbstractAntUIBuildTest(String name) {
+ super(name);
+ }
+
+ /**
+ * Runs the test and collects the result in a TestResult without blocking
+ * the UI thread.
+ */
+ public void run(final TestResult result) {
+ final Display display = Display.getCurrent();
+ Thread thread = null;
+ try {
+ Runnable r = new Runnable() {
+ public void run() {
+ AbstractAntUIBuildTest.super.run(result);
+ testing = false;
+ display.wake();
+ }
+ };
+ thread = new Thread(r);
+ thread.start();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+
+ while (testing) {
+ try {
+ if (!display.readAndDispatch())
+ display.sleep();
+ } catch (Throwable e) {
+ e.printStackTrace();
+ }
+ }
+ }
+
+ /**
+ * Launches the Ant build with the buildfile name (no extension).
+ * Waits for all of the lines to be appended to the console.
+ *
+ * @param buildFileName the buildfile to execute
+ * @return thread in which the first suspend event occurred
+ */
+ protected void launch(String buildFileName) throws CoreException {
+ super.launch(buildFileName);
+ }
+
+ /**
+ * Launches the launch configuration
+ * Waits for all of the lines to be appended to the console.
+ *
+ * @param config the config to execute
+ * @return thread in which the first suspend event occurred
+ */
+ protected void launch(ILaunchConfiguration config) throws CoreException {
+ launchAndTerminate(config, 20000);
+ }
+
+ protected void activateLink(final IHyperlink link) {
+ Display.getDefault().asyncExec(new Runnable() {
+ public void run() {
+ link.linkActivated();
+ }
+ });
+ }
+ /* (non-Javadoc)
+ * @see org.eclipse.ant.tests.ui.testplugin.AbstractAntUITest#launch(java.lang.String, java.lang.String)
+ */
+ protected void launch(String buildFileName, String arguments) throws CoreException {
+ super.launch(buildFileName, arguments);
+ }
+}
diff --git a/ant/org.eclipse.ant.tests.ui/Ant Tests/org/eclipse/ant/tests/ui/AntUtilTests.java b/ant/org.eclipse.ant.tests.ui/Ant Tests/org/eclipse/ant/tests/ui/AntUtilTests.java
new file mode 100644
index 000000000..5f8933c10
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/Ant Tests/org/eclipse/ant/tests/ui/AntUtilTests.java
@@ -0,0 +1,128 @@
+/*******************************************************************************
+ * 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
+ *******************************************************************************/
+package org.eclipse.ant.tests.ui;
+
+import java.io.File;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.ant.internal.ui.AntUtil;
+import org.eclipse.ant.internal.ui.model.AntTargetNode;
+import org.eclipse.ant.launching.IAntLaunchConstants;
+import org.eclipse.ant.tests.ui.testplugin.AbstractAntUITest;
+import org.eclipse.core.externaltools.internal.IExternalToolConstants;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+
+public class AntUtilTests extends AbstractAntUITest {
+
+ public AntUtilTests(String name) {
+ super(name);
+ }
+
+ public void testGetTargetsLaunchConfiguration() throws CoreException {
+ String buildFileName= "echoing";
+ File buildFile= getBuildFile(buildFileName + ".xml");
+ String arguments= null;
+ Map properties= null;
+ String propertyFiles= null;
+ AntTargetNode[] targets= AntUtil.getTargets(buildFile.getAbsolutePath(), getLaunchConfiguration(buildFileName, arguments, properties, propertyFiles));
+ assertTrue(targets != null);
+ assertTrue("Incorrect number of targets retrieved; should be 4 was: " + targets.length, targets.length == 4);
+ assertContains("echo3", targets);
+ }
+
+ public void testGetTargetsLaunchConfigurationMinusD() throws CoreException {
+ String buildFileName= "importRequiringUserProp";
+ File buildFile= getBuildFile(buildFileName + ".xml");
+ String arguments= "-DimportFileName=toBeImported.xml";
+ Map properties= null;
+ String propertyFiles= null;
+ AntTargetNode[] targets= AntUtil.getTargets(buildFile.getAbsolutePath(), getLaunchConfiguration(buildFileName, arguments, properties, propertyFiles));
+ assertTrue(targets != null);
+ assertTrue("Incorrect number of targets retrieved; should be 3 was: " + targets.length, targets.length == 3);
+ assertContains("import-default", targets);
+ }
+
+ public void testGetTargetsLaunchConfigurationMinusDAndProperty() throws CoreException {
+ String buildFileName= "importRequiringUserProp";
+ File buildFile= getBuildFile(buildFileName + ".xml");
+ String arguments= "-DimportFileName=toBeImported.xml";
+ //arguments should win
+ Map properties= new HashMap();
+ properties.put("importFileName", "notToBeImported.xml");
+ String propertyFiles= null;
+ AntTargetNode[] targets= AntUtil.getTargets(buildFile.getAbsolutePath(), getLaunchConfiguration(buildFileName, arguments, properties, propertyFiles));
+ assertTrue(targets != null);
+ assertTrue("Incorrect number of targets retrieved; should be 3 was: " + targets.length, targets.length == 3);
+ assertContains("import-default", targets);
+ }
+
+
+ public void testGetTargetsLaunchConfigurationProperty() throws CoreException {
+ String buildFileName= "importRequiringUserProp";
+ File buildFile= getBuildFile(buildFileName + ".xml");
+ String arguments= null;
+ Map properties= new HashMap();
+ properties.put("importFileName", "toBeImported.xml");
+ String propertyFiles= null;
+ AntTargetNode[] targets= AntUtil.getTargets(buildFile.getAbsolutePath(), getLaunchConfiguration(buildFileName, arguments, properties, propertyFiles));
+ assertTrue(targets != null);
+ assertTrue("Incorrect number of targets retrieved; should be 3 was: " + targets.length, targets.length == 3);
+ assertContains("import-default", targets);
+ }
+
+ public void testGetTargetsLaunchConfigurationPropertyFile() throws CoreException {
+ String buildFileName= "importRequiringUserProp";
+ File buildFile= getBuildFile(buildFileName + ".xml");
+ String arguments= null;
+ Map properties= null;
+ String propertyFiles= "buildtest1.properties";
+ AntTargetNode[] targets= AntUtil.getTargets(buildFile.getAbsolutePath(), getLaunchConfiguration(buildFileName, arguments, properties, propertyFiles));
+ assertTrue(targets != null);
+ assertTrue("Incorrect number of targets retrieved; should be 3 was: " + targets.length, targets.length == 3);
+ assertContains("import-default", targets);
+ }
+
+ protected ILaunchConfiguration getLaunchConfiguration(String buildFileName, String arguments, Map properties, String propertyFiles) throws CoreException {
+ ILaunchConfiguration config = getLaunchConfiguration(buildFileName);
+ assertNotNull("Could not locate launch configuration for " + buildFileName, config);
+ ILaunchConfigurationWorkingCopy copy= config.getWorkingCopy();
+ if (arguments != null) {
+ copy.setAttribute(IExternalToolConstants.ATTR_TOOL_ARGUMENTS, arguments);
+ }
+ if (properties != null) {
+ copy.setAttribute(IAntLaunchConstants.ATTR_ANT_PROPERTIES, properties);
+ }
+ if (propertyFiles != null) {
+ copy.setAttribute(IAntLaunchConstants.ATTR_ANT_PROPERTY_FILES, propertyFiles);
+ }
+ return copy;
+ }
+
+ /**
+ * Asserts that <code>displayString</code> is in one of the
+ * completion proposals.
+ */
+ private void assertContains(String targetName, AntTargetNode[] targets) {
+ boolean found = false;
+ for (int i = 0; i < targets.length; i++) {
+ AntTargetNode target = targets[i];
+ String foundName = target.getTargetName();
+ if(targetName.equals(foundName)) {
+ found = true;
+ break;
+ }
+ }
+ assertEquals("Did not find target: " + targetName, true, found);
+ }
+}
diff --git a/ant/org.eclipse.ant.tests.ui/Ant Tests/org/eclipse/ant/tests/ui/performance/AbstractAntPerformanceTest.java b/ant/org.eclipse.ant.tests.ui/Ant Tests/org/eclipse/ant/tests/ui/performance/AbstractAntPerformanceTest.java
new file mode 100644
index 000000000..b9fcd6eb4
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/Ant Tests/org/eclipse/ant/tests/ui/performance/AbstractAntPerformanceTest.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 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:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.tests.ui.performance;
+
+import org.eclipse.ant.tests.ui.testplugin.AbstractAntUITest;
+import org.eclipse.test.performance.PerformanceTestCase;
+
+/**
+ * Abstract class for ant performance tests, ensures the test project is created
+ * and ready in the test workspace.
+ *
+ * @since 3.5
+ */
+public abstract class AbstractAntPerformanceTest extends PerformanceTestCase {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.test.performance.PerformanceTestCase#setUp()
+ */
+ protected void setUp() throws Exception {
+ super.setUp();
+ AbstractAntUITest.assertProject();
+ }
+}
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
new file mode 100644
index 000000000..e3678133e
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/Ant Tests/org/eclipse/ant/tests/ui/performance/OpenLaunchConfigurationDialogTests.java
@@ -0,0 +1,109 @@
+/*******************************************************************************
+ * 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
+ *******************************************************************************/
+
+package org.eclipse.ant.tests.ui.performance;
+
+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.resources.IFile;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.internal.ui.DebugUIPlugin;
+import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
+import org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.viewers.IStructuredSelection;
+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 {
+
+ public static String fgIdentifier= IExternalToolConstants.ID_EXTERNAL_TOOLS_LAUNCH_GROUP;
+
+ public void testOpenAntLaunchConfigurationDialog1() {
+ //cold run
+ ILaunchConfiguration configuration= getLaunchConfiguration("big");
+ IStructuredSelection selection= new StructuredSelection(configuration);
+ for (int i = 0; i < 10; i++) {
+ openLCD(selection, fgIdentifier, 20);
+ }
+
+ commitMeasurements();
+ assertPerformance();
+ }
+
+ public void testOpenAntLaunchConfigurationDialog2() {
+ //warm run
+ ILaunchConfiguration configuration= getLaunchConfiguration("big");
+ IStructuredSelection selection= new StructuredSelection(configuration);
+ tagAsSummary("Open LCD on Targets tab", Dimension.ELAPSED_PROCESS);
+ for (int i = 0; i < 10; i++) {
+ openLCD(selection, fgIdentifier, 20);
+ }
+
+ commitMeasurements();
+ assertPerformance();
+ }
+
+ private ILaunchConfiguration getLaunchConfiguration(String buildFileName) {
+ IFile file = AbstractAntUITest.getJavaProject().getProject().getFolder("launchConfigurations").getFile(buildFileName + ".launch");
+ ILaunchConfiguration config = AbstractAntUITest.getLaunchManager().getLaunchConfiguration(file);
+ assertTrue("Could not find launch configuration for " + buildFileName, config.exists());
+ return config;
+ }
+
+ private void openLCD(final IStructuredSelection selection, final String groupIdentifier, int numberOfOpens) {
+ startMeasuring();
+ for (int i = 0; i < numberOfOpens; i++) {
+ //set a status to go to the targets tab
+ IStatus status = new Status(IStatus.INFO, IAntUIConstants.PLUGIN_ID, IAntUIConstants.STATUS_INIT_RUN_ANT, "", null); //$NON-NLS-1$
+ LaunchConfigurationsDialog dialog= new LaunchConfigurationsDialog(DebugUIPlugin.getShell(), DebugUIPlugin.getDefault().getLaunchConfigurationManager().getLaunchGroup(groupIdentifier));
+ dialog.setBlockOnOpen(false);
+ dialog.setOpenMode(LaunchConfigurationsDialog.LAUNCH_CONFIGURATION_DIALOG_OPEN_ON_SELECTION);
+ dialog.setInitialSelection(selection);
+ dialog.setInitialStatus(status);
+
+ dialog.open();
+ EditorTestHelper.runEventQueue(dialog.getShell());
+ dialog.close();
+ }
+ stopMeasuring();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.test.performance.PerformanceTestCase#setUp()
+ */
+ protected void setUp() throws Exception {
+ super.setUp();
+ IPreferenceStore debugPreferenceStore = DebugUIPlugin.getDefault().getPreferenceStore();
+ debugPreferenceStore.setValue(IInternalDebugUIConstants.PREF_FILTER_LAUNCH_CLOSED, false);
+ debugPreferenceStore.setValue(IInternalDebugUIConstants.PREF_FILTER_LAUNCH_DELETED, false);
+ debugPreferenceStore.setValue(IInternalDebugUIConstants.PREF_FILTER_LAUNCH_TYPES, false);
+ debugPreferenceStore.setValue(IInternalDebugUIConstants.PREF_FILTER_WORKING_SETS, false);
+ EditorTestHelper.runEventQueue();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.test.performance.PerformanceTestCase#tearDown()
+ */
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ IPreferenceStore debugPreferenceStore = DebugUIPlugin.getDefault().getPreferenceStore();
+ debugPreferenceStore.setToDefault(IInternalDebugUIConstants.PREF_FILTER_LAUNCH_CLOSED);
+ debugPreferenceStore.setToDefault(IInternalDebugUIConstants.PREF_FILTER_LAUNCH_DELETED);
+ debugPreferenceStore.setToDefault(IInternalDebugUIConstants.PREF_FILTER_LAUNCH_TYPES);
+ debugPreferenceStore.setToDefault(IInternalDebugUIConstants.PREF_FILTER_WORKING_SETS);
+ }
+}
diff --git a/ant/org.eclipse.ant.tests.ui/Ant Tests/org/eclipse/ant/tests/ui/performance/SeparateVMTests.java b/ant/org.eclipse.ant.tests.ui/Ant Tests/org/eclipse/ant/tests/ui/performance/SeparateVMTests.java
new file mode 100644
index 000000000..66af71cc5
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/Ant Tests/org/eclipse/ant/tests/ui/performance/SeparateVMTests.java
@@ -0,0 +1,105 @@
+/*******************************************************************************
+ * 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
+ *******************************************************************************/
+
+package org.eclipse.ant.tests.ui.performance;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.ant.tests.ui.AbstractAntUIBuildPerformanceTest;
+import org.eclipse.core.externaltools.internal.IExternalToolConstants;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.debug.ui.IDebugUIConstants;
+
+public class SeparateVMTests extends AbstractAntUIBuildPerformanceTest {
+
+ public SeparateVMTests(String name) {
+ super(name);
+ }
+
+ public static Test suite() {
+ return new TestSuite(SeparateVMTests.class);
+ }
+
+ /**
+ * Performance test for launching Ant in a separate vm.
+ */
+ public void testBuild() throws CoreException {
+ //tagAsSummary("Separate JRE Build", Dimension.ELAPSED_PROCESS);
+ ILaunchConfiguration config= getLaunchConfiguration("echoingSepVM");
+ //possible first time hit of the SWT pieces getting written from the JAR to the
+ //metadata area
+ launchAndTerminate(config, 20000);
+ for (int i = 0; i < 10; i++) {
+ launch(config, 10);
+ }
+ commitMeasurements();
+ assertPerformance();
+ }
+
+ /**
+ * Performance test for launching Ant in a separate vm with no console output.
+ */
+ public void testBuildNoConsole() throws CoreException {
+ //tagAsSummary("Separate JRE Build; capture output off", Dimension.ELAPSED_PROCESS);
+ ILaunchConfiguration config = getLaunchConfiguration("echoingSepVM");
+ assertNotNull("Could not locate launch configuration for " + "echoingSepVM", config);
+ ILaunchConfigurationWorkingCopy copy= config.getWorkingCopy();
+ copy.setAttribute(IDebugUIConstants.ATTR_CAPTURE_IN_CONSOLE, false);
+ copy.setAttribute(DebugPlugin.ATTR_CAPTURE_OUTPUT, false);
+ //possible first time hit of the SWT pieces getting written from the JAR to the
+ //metadata area
+ launchAndTerminate(copy, 20000);
+ for (int i = 0; i < 10; i++) {
+ launch(copy, 10);
+ }
+ commitMeasurements();
+ assertPerformance();
+ }
+
+ /**
+ * Performance test for launching Ant in a separate vm with debug information.
+ */
+ public void testBuildMinusDebug() throws CoreException {
+ //tagAsSummary("Separate JRE Build; -debug", Dimension.ELAPSED_PROCESS);
+ ILaunchConfiguration config = getLaunchConfiguration("echoingSepVM");
+ assertNotNull("Could not locate launch configuration for " + "echoingSepVM", config);
+ ILaunchConfigurationWorkingCopy copy= config.getWorkingCopy();
+ copy.setAttribute(IExternalToolConstants.ATTR_TOOL_ARGUMENTS, "-debug");
+ //possible first time hit of the SWT pieces getting written from the JAR to the
+ //metadata area
+ launchAndTerminate(copy, 20000);
+ for (int i = 0; i < 10; i++) {
+ launch(copy, 10);
+ }
+ commitMeasurements();
+ assertPerformance();
+ }
+
+ /**
+ * Performance test for launching Ant in a separate vm with lots of links
+ */
+ public void testBuildWithLotsOfLinks() throws CoreException {
+ //tagAsSummary("Separate JRE Build; links", Dimension.ELAPSED_PROCESS);
+ ILaunchConfiguration config = getLaunchConfiguration("echoPropertiesSepVM");
+ //possible first time hit of the SWT pieces getting written from the JAR to the
+ //metadata area
+ launchAndTerminate(config, 20000);
+ for (int i = 0; i < 10; i++) {
+ launch(config, 10);
+ }
+ commitMeasurements();
+ assertPerformance();
+ }
+}
diff --git a/ant/org.eclipse.ant.tests.ui/about.html b/ant/org.eclipse.ant.tests.ui/about.html
new file mode 100644
index 000000000..460233046
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 2, 2006</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/ant/org.eclipse.ant.tests.ui/build.properties b/ant/org.eclipse.ant.tests.ui/build.properties
new file mode 100644
index 000000000..03e042d2e
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/build.properties
@@ -0,0 +1,30 @@
+###############################################################################
+# 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
+###############################################################################
+bin.includes = plugin.xml,\
+ plugin.properties,\
+ test.xml,\
+ about.html,\
+ testbuildfiles/,\
+ lib/,\
+ lib/*.jar,\
+ *.jar,\
+ META-INF/
+
+source.anttestsui.jar = test plugin/,\
+ Ant Editor Tests/,\
+ Ant Debug Tests/,\
+ External Tools/,\
+ Ant Tests/
+
+source.lib/antUITestsSupport.jar = test support/
+jars.compile.order=anttestsui.jar,lib/antUITestsSupport.jar
+output.lib/antUITestsSupport.jar = test_support_bin/
+output.anttestsui.jar = bin/
diff --git a/ant/org.eclipse.ant.tests.ui/buildfiles/buildAntTestsSupportJAR.xml b/ant/org.eclipse.ant.tests.ui/buildfiles/buildAntTestsSupportJAR.xml
new file mode 100644
index 000000000..bde51270f
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/buildfiles/buildAntTestsSupportJAR.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?> <!--
+ Copyright (c) 2005, 2006 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
+ -->
+
+<project name="build tests support jar" default="build" basedir="..">
+
+ <target name="build" description="Removes all build artifacts, recreates the support jar, and refreshes this plugin's resources" depends="clean, lib/antUITestsSupport.jar"/>
+
+ <target name="init" depends="properties">
+ <property name="version.suffix" value="_3.1.0"/>
+ <property name="temp.folder" value="${basedir}/temp.folder"/>
+ <property name="plugin.destination" value="${basedir}"/>
+ <property name="build.result.folder" value="${basedir}"/>
+ </target>
+
+ <target name="properties" if="eclipse.running">
+ <property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
+ </target>
+
+ <target name="lib/antUITestsSupport.jar" depends="init" description= "Builds the support JAR">
+ <property name="destdir" value="${temp.folder}/lib/antUITestsSupport.jar.bin"/>
+ <delete dir="${destdir}"/>
+ <mkdir dir="${destdir}"/>
+ <!-- compile the source code -->
+ <javac target="1.1" destdir="${destdir}" failonerror="false" verbose="false" debug="on" includeAntRuntime="yes"
+ classpath="${basedir}/bin;
+ ${eclipse.home}/plugins/org.eclipse.ant.core${version.suffix}.jar;
+ ${basedir}/../org.eclipse.ant.core/bin
+ ${eclipse.home}/plugins/org.eclipse.ant.core${version.suffix}.jar/lib/remoteAnt.jar;
+ ${basedir}/../org.eclipse.ant.ui/lib/remoteAnt.jar">
+ <src path="test support/"/>
+ </javac>
+ <mkdir dir="${build.result.folder}/lib"/>
+ <jar destfile="${build.result.folder}/lib/antUITestsSupport.jar" basedir="${destdir}"/>
+ <delete dir="${temp.folder}"/>
+ </target>
+
+ <target name="clean" depends="init">
+ <delete file="${build.result.folder}/lib/antUITestsSupport.jar"/>
+ <delete dir="${temp.folder}"/>
+ </target>
+</project>
diff --git a/ant/org.eclipse.ant.tests.ui/icons/ant.gif b/ant/org.eclipse.ant.tests.ui/icons/ant.gif
new file mode 100644
index 000000000..6da365c94
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/icons/ant.gif
Binary files differ
diff --git a/ant/org.eclipse.ant.tests.ui/plugin.properties b/ant/org.eclipse.ant.tests.ui/plugin.properties
new file mode 100644
index 000000000..4a08e075d
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/plugin.properties
@@ -0,0 +1,13 @@
+###############################################################################
+# Copyright (c) 2003, 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:
+# IBM Corporation - initial API and implementation
+###############################################################################
+
+pluginName=Ant UI Test Plugin
+providerName=Eclipse.org
diff --git a/ant/org.eclipse.ant.tests.ui/plugin.xml b/ant/org.eclipse.ant.tests.ui/plugin.xml
new file mode 100644
index 000000000..d41961f86
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/plugin.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?> <!--
+ Copyright (c) 2005, 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:
+ IBM Corporation - initial API and implementation
+ -->
+
+<plugin>
+
+
+ <extension
+ point="org.eclipse.debug.ui.consoleLineTrackers">
+ <consoleLineTracker
+ class="org.eclipse.ant.tests.ui.testplugin.ConsoleLineTracker"
+ processType="org.eclipse.ant.ui.antProcess"
+ id="org.eclipse.ant.tests.ui.testplugin.ConsoleLineTracker">
+ </consoleLineTracker>
+ </extension>
+
+ <extension
+ point="org.eclipse.ant.core.extraClasspathEntries">
+ <extraClasspathEntry
+ library="lib/antUITestsSupport.jar"
+ eclipseRuntime="false">
+ </extraClasspathEntry>
+ </extension>
+
+ <extension point="org.eclipse.ant.core.antTasks">
+ <antTask
+ name="coolUITask"
+ class="org.eclipse.ant.tests.ui.support.tasks.AntTestTask2"
+ library="lib/antUITestsSupport.jar"
+ eclipseRuntime="false">
+ </antTask>
+ <antTask
+ name="coolUITask"
+ uri="testing"
+ class="org.eclipse.ant.tests.ui.support.tasks.AntTestTask2"
+ library="lib/antUITestsSupport.jar"
+ eclipseRuntime="false">
+ </antTask>
+ </extension>
+
+ <extension point="org.eclipse.ant.core.antTypes">
+ <antType
+ name="coolUIType"
+ class="org.eclipse.ant.tests.ui.support.types.AntTestPath"
+ library="lib/antUITestsSupport.jar"
+ eclipseRuntime="false">
+ </antType>
+ </extension>
+
+ <extension
+ point="org.eclipse.ant.core.antProperties">
+ <antProperty
+ name="property.ui.testing"
+ value="true">
+ </antProperty>
+ <antProperty
+ name="property.ui.testing2"
+ value="hey"
+ eclipseRuntime="false">
+ </antProperty>
+ </extension>
+</plugin>
diff --git a/ant/org.eclipse.ant.tests.ui/test plugin/org/eclipse/ant/tests/ui/testplugin/AbstractAntUITest.java b/ant/org.eclipse.ant.tests.ui/test plugin/org/eclipse/ant/tests/ui/testplugin/AbstractAntUITest.java
new file mode 100644
index 000000000..e6cc8391f
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/test plugin/org/eclipse/ant/tests/ui/testplugin/AbstractAntUITest.java
@@ -0,0 +1,483 @@
+/*******************************************************************************
+ * 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.tests.ui.testplugin;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.UnsupportedEncodingException;
+
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
+
+import junit.framework.TestCase;
+
+import org.eclipse.ant.internal.ui.AntUIPlugin;
+import org.eclipse.ant.internal.ui.IAntUIPreferenceConstants;
+import org.eclipse.ant.internal.ui.model.AntModel;
+import org.eclipse.ant.tests.ui.editor.support.TestLocationProvider;
+import org.eclipse.ant.tests.ui.editor.support.TestProblemRequestor;
+import org.eclipse.core.externaltools.internal.IExternalToolConstants;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.DebugEvent;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.ILaunch;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.debug.core.ILaunchManager;
+import org.eclipse.debug.core.model.IProcess;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.BadPositionCategoryException;
+import org.eclipse.jface.text.Document;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IDocumentPartitioner;
+import org.eclipse.jface.text.ITypedRegion;
+import org.eclipse.jface.text.Position;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.ui.console.IHyperlink;
+import org.eclipse.ui.internal.console.ConsoleHyperlinkPosition;
+import org.eclipse.ui.internal.console.IOConsolePartition;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+import org.xml.sax.helpers.DefaultHandler;
+
+/**
+ * Abstract Ant UI test class
+ */
+public abstract class AbstractAntUITest extends TestCase {
+
+ public static String ANT_EDITOR_ID= "org.eclipse.ant.ui.internal.editor.AntEditor";
+
+ private IDocument currentDocument;
+
+ /**
+ * Constructor
+ * @param name
+ */
+ public AbstractAntUITest(String name) {
+ super(name);
+ }
+
+ /**
+ * Returns the {@link IFile} for the given build file name
+ * @param buildFileName
+ * @return the associated {@link IFile} for the given build file name
+ */
+ protected IFile getIFile(String buildFileName) {
+ return getProject().getFolder("buildfiles").getFile(buildFileName);
+ }
+
+ /**
+ * Returns the {@link File} for the given build file name
+ * @param buildFileName
+ * @return the {@link File} for the given build file name
+ */
+ protected File getBuildFile(String buildFileName) {
+ IFile file = getIFile(buildFileName);
+ assertTrue("Could not find build file named: " + buildFileName, file.exists());
+ return file.getLocation().toFile();
+ }
+
+ /* (non-Javadoc)
+ * @see junit.framework.TestCase#setUp()
+ */
+ protected void setUp() throws Exception {
+ super.setUp();
+ assertProject();
+ }
+
+ /**
+ * Asserts that the testing project has been setup in the test workspace
+ * @throws Exception
+ *
+ * @since 3.5
+ */
+ public static void assertProject() throws Exception {
+ IProject pro = ResourcesPlugin.getWorkspace().getRoot().getProject(ProjectHelper.PROJECT_NAME);
+ if (!pro.exists()) {
+ // create project and import build files and support files
+ IProject project = ProjectHelper.createProject(ProjectHelper.PROJECT_NAME);
+ IFolder folder = ProjectHelper.addFolder(project, "buildfiles");
+ ProjectHelper.addFolder(project, "launchConfigurations");
+ File root = AntUITestPlugin.getDefault().getFileInPlugin(ProjectHelper.TEST_BUILDFILES_DIR);
+ ProjectHelper.importFilesFromDirectory(root, folder.getFullPath(), null);
+
+ ProjectHelper.createLaunchConfigurationForBoth("echoing");
+ ProjectHelper.createLaunchConfigurationForBoth("102282");
+ ProjectHelper.createLaunchConfigurationForBoth("74840");
+ ProjectHelper.createLaunchConfigurationForBoth("failingTarget");
+ ProjectHelper.createLaunchConfiguration("build");
+ ProjectHelper.createLaunchConfiguration("bad");
+ ProjectHelper.createLaunchConfiguration("importRequiringUserProp");
+ ProjectHelper.createLaunchConfigurationForSeparateVM("echoPropertiesSepVM", "echoProperties");
+ ProjectHelper.createLaunchConfigurationForSeparateVM("extensionPointSepVM", null);
+ ProjectHelper.createLaunchConfigurationForSeparateVM("extensionPointTaskSepVM", null);
+ ProjectHelper.createLaunchConfigurationForSeparateVM("extensionPointTypeSepVM", null);
+ ProjectHelper.createLaunchConfigurationForSeparateVM("input", null);
+ ProjectHelper.createLaunchConfigurationForSeparateVM("environmentVar", null);
+
+ ProjectHelper.createLaunchConfigurationForBoth("breakpoints");
+ ProjectHelper.createLaunchConfigurationForBoth("debugAntCall");
+ ProjectHelper.createLaunchConfigurationForBoth("96022");
+ ProjectHelper.createLaunchConfigurationForBoth("macrodef");
+ ProjectHelper.createLaunchConfigurationForBoth("85769");
+
+ ProjectHelper.createLaunchConfiguration("big", ProjectHelper.PROJECT_NAME + "/buildfiles/performance/build.xml");
+
+ //do not show the Ant build failed error dialog
+ AntUIPlugin.getDefault().getPreferenceStore().setValue(IAntUIPreferenceConstants.ANT_ERROR_DIALOG, false);
+ }
+ }
+
+ /**
+ * Returns the 'AntUITests' project.
+ *
+ * @return the test project
+ */
+ protected static IProject getProject() {
+ return ResourcesPlugin.getWorkspace().getRoot().getProject(ProjectHelper.PROJECT_NAME);
+ }
+
+ /**
+ * Returns the underlying {@link IDocument} for the given file name
+ * @param fileName
+ * @return the underlying {@link IDocument} for the given file name
+ */
+ protected IDocument getDocument(String fileName) {
+ File file = getBuildFile(fileName);
+ InputStream in;
+ try {
+ in = new FileInputStream(file);
+ } catch (FileNotFoundException e) {
+ return null;
+ }
+ String initialContent= getStreamContentAsString(in);
+ return new Document(initialContent);
+ }
+
+ /**
+ * Returns the contents of the given {@link InputStream} as a {@link String}
+ * @param inputStream
+ * @return the {@link InputStream} as a {@link String}
+ */
+ protected String getStreamContentAsString(InputStream inputStream) {
+ InputStreamReader reader;
+ try {
+ reader = new InputStreamReader(inputStream, ResourcesPlugin.getEncoding());
+ } catch (UnsupportedEncodingException e) {
+ AntUIPlugin.log(e);
+ return ""; //$NON-NLS-1$
+ }
+ BufferedReader tempBufferedReader = new BufferedReader(reader);
+
+ return getReaderContentAsString(tempBufferedReader);
+ }
+
+ /**
+ * Returns the contents of the given {@link BufferedReader} as a {@link String}
+ * @param bufferedReader
+ * @return the contents of the given {@link BufferedReader} as a {@link String}
+ */
+ protected String getReaderContentAsStringNew(BufferedReader bufferedReader) {
+ StringBuffer result = new StringBuffer();
+ try {
+ char[] readBuffer= new char[2048];
+ int n= bufferedReader.read(readBuffer);
+ while (n > 0) {
+ result.append(readBuffer, 0, n);
+ n= bufferedReader.read(readBuffer);
+ }
+ } catch (IOException e) {
+ AntUIPlugin.log(e);
+ return null;
+ }
+
+ return result.toString();
+ }
+
+ /**
+ * Returns the contents of the given {@link BufferedReader} as a {@link String}
+ * @param bufferedReader
+ * @return the contents of the given {@link BufferedReader} as a {@link String}
+ */
+ protected String getReaderContentAsString(BufferedReader bufferedReader) {
+ StringBuffer result = new StringBuffer();
+ try {
+ String line= bufferedReader.readLine();
+
+ while(line != null) {
+ if(result.length() != 0) {
+ result.append(System.getProperty("line.separator")); //$NON-NLS-1$
+ }
+ result.append(line);
+ line = bufferedReader.readLine();
+ }
+ } catch (IOException e) {
+ AntUIPlugin.log(e);
+ return null;
+ }
+
+ return result.toString();
+ }
+
+ /**
+ * Returns the {@link AntModel} for the given file name
+ * @param fileName
+ * @return the {@link AntModel} for the given file name
+ */
+ protected AntModel getAntModel(String fileName) {
+ currentDocument= getDocument(fileName);
+ AntModel model= new AntModel(currentDocument, new TestProblemRequestor(), new TestLocationProvider(getBuildFile(fileName)));
+ model.reconcile();
+ return model;
+ }
+
+ /**
+ * @return the current {@link IDocument} context
+ */
+ public IDocument getCurrentDocument() {
+ return currentDocument;
+ }
+
+ /**
+ * Allows the current {@link IDocument} context to be set. This method accepts <code>null</code>
+ * @param currentDocument
+ */
+ public void setCurrentDocument(IDocument currentDocument) {
+ this.currentDocument = currentDocument;
+ }
+
+ /**
+ * Launches the Ant build with the build file name (no extension).
+ *
+ * @param buildFileName the ant build file name
+ */
+ protected void launch(String buildFileName) throws CoreException {
+ ILaunchConfiguration config = getLaunchConfiguration(buildFileName);
+ assertNotNull("Could not locate launch configuration for " + buildFileName, config);
+ launchAndTerminate(config, 20000);
+ }
+
+ /**
+ * Launches the Ant build with the build file name (no extension).
+ *
+ * @param buildFileName the build file
+ * @param arguments the ant arguments
+ */
+ protected void launch(String buildFileName, String arguments) throws CoreException {
+ ILaunchConfiguration config = getLaunchConfiguration(buildFileName);
+ assertNotNull("Could not locate launch configuration for " + buildFileName, config);
+ ILaunchConfigurationWorkingCopy copy= config.getWorkingCopy();
+ copy.setAttribute(IExternalToolConstants.ATTR_TOOL_ARGUMENTS, arguments);
+ launchAndTerminate(copy, 20000);
+ }
+
+ /**
+ * Launches the Ant build in debug output mode with the build file name (no extension).
+ *
+ * @param mainTypeName the program to launch
+ * @return thread in which the first suspend event occurred
+ */
+ protected void launchWithDebug(String buildFileName) throws CoreException {
+ ILaunchConfiguration config = getLaunchConfiguration(buildFileName);
+ assertNotNull("Could not locate launch configuration for " + buildFileName, config);
+ ILaunchConfigurationWorkingCopy copy= config.getWorkingCopy();
+ copy.setAttribute(IExternalToolConstants.ATTR_TOOL_ARGUMENTS, "-debug");
+ launchAndTerminate(copy, 10000);
+ }
+
+ /**
+ * Returns the launch configuration for the given build file
+ *
+ * @param buildFileName build file to launch
+ * @see ProjectCreationDecorator
+ */
+ protected ILaunchConfiguration getLaunchConfiguration(String buildFileName) {
+ IFile file = getJavaProject().getProject().getFolder("launchConfigurations").getFile(buildFileName + ".launch");
+ ILaunchConfiguration config = getLaunchManager().getLaunchConfiguration(file);
+ assertTrue("Could not find launch configuration for " + buildFileName, config.exists());
+ return config;
+ }
+
+ /**
+ * Returns the content of the specified file as <code>String</code>.
+ */
+ protected String getFileContentAsString(File aFile) throws FileNotFoundException {
+ InputStream stream = new FileInputStream(aFile);
+ InputStreamReader reader = new InputStreamReader(stream);
+ BufferedReader bufferedReader = new BufferedReader(reader);
+
+ return getReaderContentAsString(bufferedReader);
+ }
+
+ /**
+ * @return a new SAX parser instrance
+ */
+ protected SAXParser getSAXParser() {
+ SAXParser parser = null;
+ try {
+ parser = SAXParserFactory.newInstance().newSAXParser();
+ } catch (ParserConfigurationException e) {
+ AntUIPlugin.log(e);
+ } catch (SAXException e) {
+ AntUIPlugin.log(e);
+ }
+ return parser;
+ }
+
+
+ /**
+ * Parses the given input stream with the given parser using the given handler
+ * @param stream
+ * @param parser
+ * @param handler
+ * @param editedFile
+ */
+ protected void parse(InputStream stream, SAXParser parser, DefaultHandler handler, File editedFile) {
+ InputSource inputSource= new InputSource(stream);
+ if (editedFile != null) {
+ //needed for resolving relative external entities
+ inputSource.setSystemId(editedFile.getAbsolutePath());
+ }
+
+ try {
+ parser.parse(inputSource, handler);
+ } catch (SAXException e) {
+ } catch (IOException e) {
+ }
+ }
+
+ /**
+ * Returns the launch manager
+ *
+ * @return launch manager
+ */
+ public static ILaunchManager getLaunchManager() {
+ return DebugPlugin.getDefault().getLaunchManager();
+ }
+
+ /**
+ * Returns the 'AntUITests' project.
+ *
+ * @return the test project
+ */
+ public static IJavaProject getJavaProject() {
+ return JavaCore.create( getProject());
+ }
+
+ /**
+ * Launches the given configuration and waits for the terminated event or the length of the given timeout,
+ * whichever comes first
+ * @param config
+ * @param timeout
+ * @throws CoreException
+ */
+ protected void launchAndTerminate(ILaunchConfiguration config, int timeout) throws CoreException {
+ DebugEventWaiter waiter= new DebugElementKindEventWaiter(DebugEvent.TERMINATE, IProcess.class);
+ waiter.setTimeout(timeout);
+
+ Object terminatee = launchAndWait(config, waiter);
+ assertNotNull("Program did not terminate.", terminatee);
+ assertTrue("terminatee is not an IProcess", terminatee instanceof IProcess);
+ IProcess process = (IProcess) terminatee;
+ boolean terminated = process.isTerminated();
+ assertTrue("process is not terminated", terminated);
+ }
+
+ /**
+ * Launches the given configuration and waits for an event. Returns the
+ * source of the event. If the event is not received, the launch is
+ * terminated and an exception is thrown.
+ *
+ * @param configuration the configuration to launch
+ * @param waiter the event waiter to use
+ * @return Object the source of the event
+ * @exception Exception if the event is never received.
+ */
+ protected Object launchAndWait(ILaunchConfiguration configuration, DebugEventWaiter waiter) throws CoreException {
+ ILaunch launch = configuration.launch(ILaunchManager.RUN_MODE, null);
+ Object suspendee= waiter.waitForEvent();
+ if (suspendee == null) {
+ try {
+ launch.terminate();
+ } catch (CoreException e) {
+ e.printStackTrace();
+ fail("Program did not suspend, and unable to terminate launch.");
+ }
+ }
+ assertNotNull("Program did not suspend, launch terminated.", suspendee);
+ boolean terminated = launch.isTerminated();
+ assertTrue("launch did not terminate", terminated);
+ if (terminated && !ConsoleLineTracker.isClosed()) {
+ ConsoleLineTracker.waitForConsole();
+ }
+ assertTrue("Console is not closed", ConsoleLineTracker.isClosed());
+ return suspendee;
+ }
+
+ /**
+ * Returns the {@link IHyperlink} at the given offset on the given document,
+ * or <code>null</code> if there is no {@link IHyperlink} at that offset on the document.
+ * @param offset
+ * @param doc
+ * @return the {@link IHyperlink} at the given offset on the given document or <code>null</code>
+ */
+ protected IHyperlink getHyperlink(int offset, IDocument doc) {
+ if (offset >= 0 && doc != null) {
+ Position[] positions = null;
+ try {
+ positions = doc.getPositions(ConsoleHyperlinkPosition.HYPER_LINK_CATEGORY);
+ } catch (BadPositionCategoryException ex) {
+ // no links have been added
+ return null;
+ }
+ for (int i = 0; i < positions.length; i++) {
+ Position position = positions[i];
+ if (offset >= position.getOffset() && offset <= (position.getOffset() + position.getLength())) {
+ return ((ConsoleHyperlinkPosition)position).getHyperLink();
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns the {@link Color} at the given offset on the given document,
+ * or <code>null</code> if there is no {@link Color} at that offset on the document.
+ * @param offset
+ * @param doc
+ * @return the {@link Color} at the given offset on the given document or <code>null</code>
+ */
+ protected Color getColorAtOffset(int offset, IDocument document) throws BadLocationException {
+ if (document != null) {
+ IDocumentPartitioner partitioner = document.getDocumentPartitioner();
+ if (partitioner != null) {
+ ITypedRegion[] regions= partitioner.computePartitioning(offset, document.getLineInformationOfOffset(offset).getLength());
+ if (regions.length > 0) {
+ IOConsolePartition partition = (IOConsolePartition)regions[0];
+ return partition.getColor();
+ }
+ }
+ }
+ return null;
+ }
+} \ No newline at end of file
diff --git a/ant/org.eclipse.ant.tests.ui/test plugin/org/eclipse/ant/tests/ui/testplugin/AntUIPerformanceTests.java b/ant/org.eclipse.ant.tests.ui/test plugin/org/eclipse/ant/tests/ui/testplugin/AntUIPerformanceTests.java
new file mode 100644
index 000000000..3a9da6423
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/test plugin/org/eclipse/ant/tests/ui/testplugin/AntUIPerformanceTests.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * 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:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.ant.tests.ui.testplugin;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.ant.tests.ui.editor.performance.OpenAntEditorTest;
+import org.eclipse.ant.tests.ui.performance.SeparateVMTests;
+
+/**
+ * Performance Test suite for the Ant UI.
+ * All of the tests in this suite rely on the setup that occurs in the
+ * ProjectCreationDecorator suite. It must always run before any of the other
+ * test suites.
+ */
+public class AntUIPerformanceTests extends TestSuite {
+
+ public static Test suite() {
+
+ TestSuite suite = new AntUIPerformanceTests();
+ suite.setName("Ant UI Performance Unit Tests");
+ suite.addTest(new TestSuite(OpenAntEditorTest.class));
+ suite.addTest(new TestSuite(SeparateVMTests.class));
+ //suite.addTest(new TestSuite(NonInitialTypingTest.class));
+ //suite.addTest(new TestSuite(OpenLaunchConfigurationDialogTests.class));
+ return suite;
+ }
+}
diff --git a/ant/org.eclipse.ant.tests.ui/test plugin/org/eclipse/ant/tests/ui/testplugin/AntUITestPlugin.java b/ant/org.eclipse.ant.tests.ui/test plugin/org/eclipse/ant/tests/ui/testplugin/AntUITestPlugin.java
new file mode 100644
index 000000000..7f42975ce
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/test plugin/org/eclipse/ant/tests/ui/testplugin/AntUITestPlugin.java
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 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.tests.ui.testplugin;
+
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URL;
+
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceDescription;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.Bundle;
+
+
+public class AntUITestPlugin extends AbstractUIPlugin {
+
+ private static AntUITestPlugin deflt;
+
+ public AntUITestPlugin() {
+ super();
+ deflt= this;
+ }
+
+ public static AntUITestPlugin getDefault() {
+ return deflt;
+ }
+
+ public static IWorkspace getWorkspace() {
+ return ResourcesPlugin.getWorkspace();
+ }
+
+ public static void enableAutobuild(boolean enable) throws CoreException {
+ // disable auto build
+ IWorkspace workspace= AntUITestPlugin.getWorkspace();
+ IWorkspaceDescription desc= workspace.getDescription();
+ desc.setAutoBuilding(enable);
+ workspace.setDescription(desc);
+ }
+
+ public File getFileInPlugin(IPath path) {
+ try {
+ Bundle bundle = getDefault().getBundle();
+ URL installURL= new URL(bundle.getEntry("/"), path.toString());
+ URL localURL= FileLocator.toFileURL(installURL);
+ return new File(localURL.getFile());
+ } catch (IOException e) {
+ return null;
+ }
+ }
+}
diff --git a/ant/org.eclipse.ant.tests.ui/test plugin/org/eclipse/ant/tests/ui/testplugin/ConsoleLineTracker.java b/ant/org.eclipse.ant.tests.ui/test plugin/org/eclipse/ant/tests/ui/testplugin/ConsoleLineTracker.java
new file mode 100644
index 000000000..231cfc445
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/test plugin/org/eclipse/ant/tests/ui/testplugin/ConsoleLineTracker.java
@@ -0,0 +1,117 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 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.tests.ui.testplugin;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.debug.ui.console.IConsole;
+import org.eclipse.debug.ui.console.IConsoleLineTrackerExtension;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+
+/**
+ * Simple console line tracker extension point that collects the lines
+ * appended to the console.
+ */
+public class ConsoleLineTracker implements IConsoleLineTrackerExtension {
+
+ private static IConsole console;
+ private static List lines= new ArrayList();
+
+ private static boolean consoleClosed= true;
+
+ /**
+ * @see org.eclipse.debug.ui.console.IConsoleLineTracker#dispose()
+ */
+ public void dispose() {
+ }
+
+ /**
+ * @see org.eclipse.debug.ui.console.IConsoleLineTracker#init(org.eclipse.debug.ui.console.IConsole)
+ */
+ public void init(IConsole c) {
+ synchronized(lines) {
+ ConsoleLineTracker.console= c;
+ lines= new ArrayList();
+ consoleClosed= false;
+ }
+ }
+
+ /**
+ * @see org.eclipse.debug.ui.console.IConsoleLineTracker#lineAppended(org.eclipse.jface.text.IRegion)
+ */
+ public void lineAppended(IRegion line) {
+ lines.add(line);
+ }
+
+ public static int getNumberOfMessages() {
+ return lines.size();
+ }
+
+ public static String getMessage(int index) {
+ if (index < lines.size()){
+ IRegion lineRegion= (IRegion)lines.get(index);
+ try {
+ return console.getDocument().get(lineRegion.getOffset(), lineRegion.getLength());
+ } catch (BadLocationException e) {
+ return null;
+ }
+ }
+ return null;
+ }
+
+ public static List getAllMessages() {
+ List all= new ArrayList(lines.size());
+ for (int i = 0; i < lines.size(); i++) {
+ IRegion lineRegion= (IRegion)lines.get(i);
+ try {
+ all.add(console.getDocument().get(lineRegion.getOffset(), lineRegion.getLength()));
+ } catch (BadLocationException e) {
+ continue;
+ }
+ }
+ return all;
+ }
+
+ public static IDocument getDocument() {
+ return console.getDocument();
+ }
+
+ public static void waitForConsole() {
+ synchronized (lines) {
+ if (consoleClosed) {
+ return;
+ }
+ try {
+ lines.wait(20000);
+ } catch (InterruptedException ie) {
+ }
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.ui.console.IConsoleLineTrackerExtension#consoleClosed()
+ */
+ public void consoleClosed() {
+ synchronized (lines) {
+ consoleClosed= true;
+ lines.notifyAll();
+ }
+ }
+
+ public static boolean isClosed() {
+ synchronized (lines) {
+ return consoleClosed;
+ }
+ }
+}
diff --git a/ant/org.eclipse.ant.tests.ui/test plugin/org/eclipse/ant/tests/ui/testplugin/DebugElementKindEventWaiter.java b/ant/org.eclipse.ant.tests.ui/test plugin/org/eclipse/ant/tests/ui/testplugin/DebugElementKindEventWaiter.java
new file mode 100644
index 000000000..094a32fab
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/test plugin/org/eclipse/ant/tests/ui/testplugin/DebugElementKindEventWaiter.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 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:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.tests.ui.testplugin;
+
+import org.eclipse.debug.core.DebugEvent;
+
+/**
+ * Waits for a type of event on a kind of element. Compare this to SpecificDebugElementEventWaiter which is
+ * used to wait for a type of event on a specific debug element object.
+ */
+
+public class DebugElementKindEventWaiter extends DebugEventWaiter {
+
+ protected Class fElementClass;
+
+ public DebugElementKindEventWaiter(int eventKind, Class elementClass) {
+ super(eventKind);
+ fElementClass = elementClass;
+ }
+
+ public boolean accept(DebugEvent event) {
+ Object o = event.getSource();
+ return super.accept(event) && fElementClass.isInstance(o);
+ }
+
+}
+
+
diff --git a/ant/org.eclipse.ant.tests.ui/test plugin/org/eclipse/ant/tests/ui/testplugin/DebugEventWaiter.java b/ant/org.eclipse.ant.tests.ui/test plugin/org/eclipse/ant/tests/ui/testplugin/DebugEventWaiter.java
new file mode 100644
index 000000000..0cd2a6862
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/test plugin/org/eclipse/ant/tests/ui/testplugin/DebugEventWaiter.java
@@ -0,0 +1,170 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 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:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.tests.ui.testplugin;
+
+import org.eclipse.debug.core.DebugEvent;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.IDebugEventSetListener;
+
+/**
+ * The <code>DebugEventWaiter</code> is
+ * to wait for a specific kind of debug event.
+ * <p>
+ * When a <code>DebugEventWaiter</code> is created, it
+ * registers itself with the <code>DebugPlugin</code> as
+ * an <code>IDebugEventSetListener</code>.
+ * <p>
+ * NOTE: <code>DebugEventWaiter</code> objects are intended for
+ * one time use only!
+ */
+public class DebugEventWaiter implements IDebugEventSetListener {
+ /**
+ * The kind of event the waiter is waiting for
+ */
+ protected int fEventType;
+
+ /**
+ * The number of milliseconds the waiter will wait before timing out.
+ */
+ protected long fTimeout;
+
+ /**
+ * The <code>IDebugModelManager</code> this waiter is listening to.
+ */
+ protected DebugPlugin fDebugPlugin;
+
+ /**
+ * The <code>DebugEvent</code> received.
+ */
+ protected DebugEvent fEvent;
+
+ /**
+ * The event set that was accepted
+ */
+ protected DebugEvent[] fEventSet;
+
+ /**
+ * The default timeout value if none is given (5000).
+ */
+ public static final long DEFAULT_TIMEOUT= 5000;
+
+ /**
+ * Creates a new <code>DebugEventWaiter</code> which
+ * waits for events of a kind <code>eventType</code>.
+ * The wait method will wait the default timeout value.
+ */
+ public DebugEventWaiter(int eventType) {
+ fDebugPlugin= DebugPlugin.getDefault();
+ fEventType= eventType;
+ fTimeout= DEFAULT_TIMEOUT;
+
+ fDebugPlugin.addDebugEventListener(this);
+ }
+
+ /**
+ * Answers true if the <code>DebugEvent</code> is acceptable.
+ */
+ public boolean accept(DebugEvent event) {
+ return event.getKind() == fEventType && event.getDetail() != DebugEvent.EVALUATION_IMPLICIT;
+ }
+ /**
+ * Answers the event name associated with the given flag.
+ */
+ public String getEventName(int flag) {
+ switch (flag) {
+ case DebugEvent.CREATE :
+ return "Create";
+ case DebugEvent.TERMINATE :
+ return "Terminate";
+ case DebugEvent.RESUME :
+ return "Resume";
+ case DebugEvent.SUSPEND :
+ return "Suspend";
+ default :
+ return "UNKNOWN";
+ }
+ }
+
+ /**
+ * Handles debug events.
+ *
+ * @see IDebugEventListener
+ * @see #accept(DebugEvent)
+ */
+ public synchronized void handleDebugEvents(DebugEvent[] events) {
+ //printReceived(events);
+ for (int i = 0; i < events.length; i++) {
+ if (accept(events[i])) {
+ fEvent= events[i];
+ fEventSet = events;
+ unregister();
+ notifyAll();
+ return;
+ }
+ }
+ }
+
+ /**
+ * Prints a message indicating which event was received.
+ */
+ protected void printReceived(DebugEvent[] events) {
+ for (int i = 0; i < events.length; i++) {
+ System.out.println(this +" got " + events[i]);
+ }
+ }
+
+ /**
+ * Sets the number of milliseconds to wait for this callback
+ */
+ public void setTimeout(long milliseconds) {
+ fTimeout= milliseconds;
+ }
+
+ /**
+ * Unregisters this waiter as a listener
+ */
+ public void unregister() {
+ fDebugPlugin.removeDebugEventListener(this);
+ }
+
+ /**
+ * Returns the source of the accepted event, or <code>null</code>
+ * if no event was accepted.
+ */
+ public synchronized Object waitForEvent() {
+ if (fEvent == null) {
+ try {
+ wait(fTimeout);
+ } catch (InterruptedException ie) {
+ System.err.println("Interrupted waiting for event");
+ }
+ }
+ unregister();
+ if (fEvent == null)
+ return null;
+ return fEvent.getSource();
+ }
+
+ /**
+ * Returns the accepted event, if any.
+ */
+ public DebugEvent getEvent() {
+ return fEvent;
+ }
+
+ /**
+ * Returns the accepted event set, if any.
+ */
+ public DebugEvent[] getEventSet() {
+ return fEventSet;
+ }
+}
+
diff --git a/ant/org.eclipse.ant.tests.ui/test plugin/org/eclipse/ant/tests/ui/testplugin/ProjectCreationDecorator.java b/ant/org.eclipse.ant.tests.ui/test plugin/org/eclipse/ant/tests/ui/testplugin/ProjectCreationDecorator.java
new file mode 100644
index 000000000..cc4a2912a
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/test plugin/org/eclipse/ant/tests/ui/testplugin/ProjectCreationDecorator.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 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:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.tests.ui.testplugin;
+
+
+
+/**
+ * Utility class
+ */
+public class ProjectCreationDecorator {
+
+ private static boolean fgIsJ2SE15Compatible = false ;
+
+ static {
+ String version = System.getProperty("java.specification.version");
+ if (version != null) {
+ String[] nums = version.split("\\.");
+ if (nums.length == 2) {
+ try {
+ int major = Integer.parseInt(nums[0]);
+ int minor = Integer.parseInt(nums[1]);
+ if (major >= 1) {
+ if (minor >= 5) {
+ fgIsJ2SE15Compatible = true;
+ }
+ }
+ } catch (NumberFormatException e) {
+ }
+ }
+ }
+ };
+
+ /**
+ * @return if the system property "java.specification.version" is 1.5 or greater
+ */
+ public static boolean isJ2SE15Compatible() {
+ return fgIsJ2SE15Compatible;
+ }
+}
diff --git a/ant/org.eclipse.ant.tests.ui/test plugin/org/eclipse/ant/tests/ui/testplugin/ProjectHelper.java b/ant/org.eclipse.ant.tests.ui/test plugin/org/eclipse/ant/tests/ui/testplugin/ProjectHelper.java
new file mode 100644
index 000000000..2f0c7bac7
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/test plugin/org/eclipse/ant/tests/ui/testplugin/ProjectHelper.java
@@ -0,0 +1,229 @@
+/*******************************************************************************
+ * 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.tests.ui.testplugin;
+
+
+import java.io.File;
+import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.ant.internal.ui.IAntUIConstants;
+import org.eclipse.ant.launching.IAntLaunchConstants;
+import org.eclipse.core.externaltools.internal.IExternalToolConstants;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectDescription;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationType;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.debug.ui.IDebugUIConstants;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
+import org.eclipse.jdt.launching.IVMInstall;
+import org.eclipse.jdt.launching.JavaRuntime;
+import org.eclipse.ui.dialogs.IOverwriteQuery;
+import org.eclipse.ui.wizards.datatransfer.FileSystemStructureProvider;
+import org.eclipse.ui.wizards.datatransfer.IImportStructureProvider;
+import org.eclipse.ui.wizards.datatransfer.ImportOperation;
+
+/**
+ * Helper methods to set up an IProject.
+ */
+public class ProjectHelper {
+
+ public static final IPath TEST_BUILDFILES_DIR= new Path("testbuildfiles");
+ public static final IPath TEST_RESOURCES_DIR= new Path("testresources");
+ public static final IPath TEST_LIB_DIR= new Path("testlib");
+
+ public static final String PROJECT_NAME= "Ant UI Tests";
+
+ /**
+ * Creates a IProject.
+ */
+ public static IProject createProject(String projectName) throws CoreException {
+ IWorkspaceRoot root= ResourcesPlugin.getWorkspace().getRoot();
+ IProject project= root.getProject(projectName);
+ if (!project.exists()) {
+ project.create(null);
+ } else {
+ project.refreshLocal(IResource.DEPTH_INFINITE, null);
+ }
+
+ if (!project.isOpen()) {
+ project.open(null);
+ }
+
+ if (!project.hasNature(JavaCore.NATURE_ID)) {
+ addNatureToProject(project, JavaCore.NATURE_ID, null);
+ }
+
+ return project;
+ }
+
+ private static void addNatureToProject(IProject proj, String natureId, IProgressMonitor monitor) throws CoreException {
+ IProjectDescription description = proj.getDescription();
+ String[] prevNatures= description.getNatureIds();
+ String[] newNatures= new String[prevNatures.length + 1];
+ System.arraycopy(prevNatures, 0, newNatures, 0, prevNatures.length);
+ newNatures[prevNatures.length]= natureId;
+ description.setNatureIds(newNatures);
+ proj.setDescription(description, monitor);
+ }
+
+ /**
+ * Removes an IProject.
+ */
+ public static void delete(IProject project) throws CoreException {
+ project.delete(true, true, null);
+ }
+
+
+ /**
+ * Adds a folder to an IProject.
+ */
+ public static IFolder addFolder(IProject project, String containerName) throws CoreException {
+
+ IFolder folder= project.getFolder(containerName);
+ if (!folder.exists()) {
+ folder.create(false, true, null);
+ }
+
+ return folder;
+
+ }
+
+ public static void importFilesFromDirectory(File rootDir, IPath destPath, IProgressMonitor monitor) throws InvocationTargetException, IOException {
+ IImportStructureProvider structureProvider = FileSystemStructureProvider.INSTANCE;
+ List files = new ArrayList(100);
+ addFiles(rootDir, files);
+ try {
+ ImportOperation op= new ImportOperation(destPath, rootDir, structureProvider, new ImportOverwriteQuery(), files);
+ op.setCreateContainerStructure(false);
+ op.run(monitor);
+ } catch (InterruptedException e) {
+ // should not happen
+ }
+ }
+
+ private static void addFiles(File dir, List collection) throws IOException {
+ File[] files = dir.listFiles();
+ List subDirs = new ArrayList(2);
+ for (int i = 0; i < files.length; i++) {
+ if (files[i].isFile()) {
+ collection.add(files[i]);
+ } else if (files[i].isDirectory()) {
+ subDirs.add(files[i]);
+ }
+ }
+ Iterator iter = subDirs.iterator();
+ while (iter.hasNext()) {
+ File subDir = (File)iter.next();
+ addFiles(subDir, collection);
+ }
+ }
+
+ private static class ImportOverwriteQuery implements IOverwriteQuery {
+ public String queryOverwrite(String file) {
+ return ALL;
+ }
+ }
+
+ /**
+ * Creates two launch configurations one standard one and one for a separate VM
+ * @param launchConfigName
+ * @throws Exception
+ *
+ * @since 3.5
+ */
+ public static void createLaunchConfigurationForBoth(String launchConfigName) throws Exception {
+ ProjectHelper.createLaunchConfiguration(launchConfigName);
+ ProjectHelper.createLaunchConfigurationForSeparateVM(launchConfigName + "SepVM", launchConfigName);
+ }
+
+ /**
+ * Creates a shared launch configuration for launching Ant in a separate VM with the given
+ * name.
+ *
+ * @since 3.5
+ */
+ public static void createLaunchConfigurationForSeparateVM(String launchConfigName, String buildFileName) throws Exception {
+ String bf = buildFileName;
+ ILaunchConfigurationType type = AbstractAntUITest.getLaunchManager().getLaunchConfigurationType(IAntLaunchConstants.ID_ANT_LAUNCH_CONFIGURATION_TYPE);
+ ILaunchConfigurationWorkingCopy config = type.newInstance(AbstractAntUITest.getJavaProject().getProject().getFolder("launchConfigurations"), launchConfigName);
+
+ config.setAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME, "org.eclipse.ant.internal.launching.remote.InternalAntRunner"); //$NON-NLS-1$
+ config.setAttribute(IJavaLaunchConfigurationConstants.ATTR_CLASSPATH_PROVIDER, "org.eclipse.ant.ui.AntClasspathProvider"); //$NON-NLS-1$
+ config.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, AbstractAntUITest.getJavaProject().getElementName());
+ if (bf == null) {
+ bf= launchConfigName;
+ }
+ config.setAttribute(IExternalToolConstants.ATTR_LOCATION, "${workspace_loc:/" + PROJECT_NAME + "/buildfiles/" + bf + ".xml}");
+
+ config.setAttribute(IDebugUIConstants.ATTR_LAUNCH_IN_BACKGROUND, true);
+ config.setAttribute(DebugPlugin.ATTR_PROCESS_FACTORY_ID, IAntUIConstants.REMOTE_ANT_PROCESS_FACTORY_ID);
+
+ ProjectHelper.setVM(config);
+
+ config.doSave();
+ }
+
+ /**
+ * Sets the workspace default VM on the given working copy
+ * @param config
+ *
+ * @since 3.5
+ */
+ public static void setVM(ILaunchConfigurationWorkingCopy config) {
+ IVMInstall vm = JavaRuntime.getDefaultVMInstall();
+ String vmName= vm.getName();
+ String vmTypeID= vm.getVMInstallType().getId();
+ config.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_INSTALL_NAME, vmName);
+ config.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_INSTALL_TYPE, vmTypeID);
+ }
+
+ /**
+ * Creates a shared launch configuration for launching Ant in a separate VM with the given
+ * name.
+ */
+ public static void createLaunchConfiguration(String launchConfigName) throws Exception {
+ ProjectHelper.createLaunchConfiguration(launchConfigName, PROJECT_NAME + "/buildfiles/" + launchConfigName + ".xml");
+ }
+
+ /**
+ * Creates a launch configuration with the given name in the given location
+ * @param launchConfigName
+ * @param path
+ * @return the handle to the new launch configuration
+ * @throws CoreException
+ */
+ public static ILaunchConfiguration createLaunchConfiguration(String launchConfigName, String path) throws CoreException {
+ ILaunchConfigurationType type = AbstractAntUITest.getLaunchManager().getLaunchConfigurationType(IAntLaunchConstants.ID_ANT_LAUNCH_CONFIGURATION_TYPE);
+ ILaunchConfigurationWorkingCopy config = type.newInstance(AbstractAntUITest.getJavaProject().getProject().getFolder("launchConfigurations"), launchConfigName);
+
+ config.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, AbstractAntUITest.getJavaProject().getElementName());
+ config.setAttribute(IExternalToolConstants.ATTR_LOCATION, "${workspace_loc:/" + path + "}");
+ config.setAttribute(IDebugUIConstants.ATTR_LAUNCH_IN_BACKGROUND, true);
+
+ config.doSave();
+ return config;
+ }
+}
diff --git a/ant/org.eclipse.ant.tests.ui/test support/org/eclipse/ant/tests/ui/support/inputHandlers/TestSWTInputHandler.java b/ant/org.eclipse.ant.tests.ui/test support/org/eclipse/ant/tests/ui/support/inputHandlers/TestSWTInputHandler.java
new file mode 100644
index 000000000..9e388c41e
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/test support/org/eclipse/ant/tests/ui/support/inputHandlers/TestSWTInputHandler.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * 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:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.ant.tests.ui.support.inputHandlers;
+
+
+public class TestSWTInputHandler {//extends SWTInputHandler {
+
+
+// /* (non-Javadoc)
+// * @see org.eclipse.ant.internal.ui.antsupport.inputhandler.SWTInputHandler#open(java.lang.String, java.lang.String, boolean[])
+// */
+// protected void open(String title, String prompt, boolean[] result) {
+// fRequest.setInput("TestSWTInputHandler");
+// result[0]= true;
+// }
+}
diff --git a/ant/org.eclipse.ant.tests.ui/test support/org/eclipse/ant/tests/ui/support/tasks/AntTestTask.java b/ant/org.eclipse.ant.tests.ui/test support/org/eclipse/ant/tests/ui/support/tasks/AntTestTask.java
new file mode 100644
index 000000000..958b0dc55
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/test support/org/eclipse/ant/tests/ui/support/tasks/AntTestTask.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 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:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.tests.ui.support.tasks;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Task;
+import org.apache.tools.ant.taskdefs.Echo;
+
+
+public class AntTestTask extends Task {
+
+ public AntTestTask() {
+ super();
+ }
+
+ /**
+ * @see org.apache.tools.ant.Task#execute()
+ */
+ public void execute() throws BuildException {
+ Echo echo= new Echo();
+ echo.setProject(getProject());
+ echo.setMessage("Testing Ant in Eclipse with a custom task");
+ echo.execute();
+ }
+}
diff --git a/ant/org.eclipse.ant.tests.ui/test support/org/eclipse/ant/tests/ui/support/tasks/AntTestTask2.java b/ant/org.eclipse.ant.tests.ui/test support/org/eclipse/ant/tests/ui/support/tasks/AntTestTask2.java
new file mode 100644
index 000000000..42861c11d
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/test support/org/eclipse/ant/tests/ui/support/tasks/AntTestTask2.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 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:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.tests.ui.support.tasks;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Task;
+import org.apache.tools.ant.taskdefs.Echo;
+import org.apache.tools.ant.types.EnumeratedAttribute;
+import org.apache.tools.ant.types.Reference;
+
+
+public class AntTestTask2 extends Task {
+
+ String fMessage= "Default";
+ Reference fRef= null;
+
+ public AntTestTask2() {
+ super();
+ }
+
+ /**
+ * @see org.apache.tools.ant.Task#execute()
+ */
+ public void execute() throws BuildException {
+ Echo echo= new Echo();
+ echo.setProject(getProject());
+ echo.setMessage("Testing Ant in Eclipse with a custom task2: " + fMessage);
+ echo.execute();
+ }
+
+ public void setMessage(Cool attr) {
+ fMessage = attr.getValue();
+ }
+
+ public void setReference(Reference ref) {
+ fRef= ref;
+ }
+
+ /**
+ * Enumerated attribute with the values "cool", "chillin" and "awesome".
+ */
+ public static class Cool extends EnumeratedAttribute {
+ public String[] getValues() {
+ return new String[] {"cool", "chillin", "awesome"};
+ }
+ }
+}
diff --git a/ant/org.eclipse.ant.tests.ui/test support/org/eclipse/ant/tests/ui/support/tasks/NestElementTask.java b/ant/org.eclipse.ant.tests.ui/test support/org/eclipse/ant/tests/ui/support/tasks/NestElementTask.java
new file mode 100644
index 000000000..f6a71197a
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/test support/org/eclipse/ant/tests/ui/support/tasks/NestElementTask.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 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:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.ant.tests.ui.support.tasks;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Task;
+import org.apache.tools.ant.taskdefs.Echo;
+
+public class NestElementTask extends Task {
+
+ String message= "bar";
+ NestedElement e;
+ public static class NestedElement{
+ Boolean works= Boolean.FALSE;
+ public NestedElement() {
+ }
+
+ public void setWorks(Boolean booleanValue) {
+ works= booleanValue;
+ }
+
+ public boolean works() {
+ return works.booleanValue();
+ }
+ }
+ public void addNestedElement(NestedElement nestedElement) {
+ e= nestedElement;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.tools.ant.Task#execute()
+ */
+ public void execute() throws BuildException {
+ Echo echo= new Echo();
+ echo.setProject(getProject());
+ if (e.works()) {
+ echo.setMessage(message);
+ } else {
+ echo.setMessage("ack");
+ }
+ echo.execute();
+ }
+}
diff --git a/ant/org.eclipse.ant.tests.ui/test support/org/eclipse/ant/tests/ui/support/types/AntTestPath.java b/ant/org.eclipse.ant.tests.ui/test support/org/eclipse/ant/tests/ui/support/types/AntTestPath.java
new file mode 100644
index 000000000..ecd428c2b
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/test support/org/eclipse/ant/tests/ui/support/types/AntTestPath.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 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:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.tests.ui.support.types;
+
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.types.Path;
+
+public class AntTestPath extends Path {
+
+ String message;
+
+ public AntTestPath(Project project) {
+ super(project);
+ }
+
+ public void setMessage(String message) {
+ this.message= message;
+ }
+
+ public String getMessage() {
+ return message;
+ }
+
+}
diff --git a/ant/org.eclipse.ant.tests.ui/test.xml b/ant/org.eclipse.ant.tests.ui/test.xml
new file mode 100644
index 000000000..c6f156374
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/test.xml
@@ -0,0 +1,71 @@
+<?xml version="1.0"?>
+
+<project name="testsuite" default="run" basedir=".">
+ <!-- sets the properties eclipse-home, and library-file -->
+ <!-- The property ${eclipse-home} should be passed into this script -->
+ <!-- Set a meaningful default value for when it is not. -->
+ <property name="eclipse-home" value="${basedir}\..\.."/>
+<property name="plugin-name" value="org.eclipse.ant.tests.ui"/>
+ <property name="library-file"
+ value="${eclipse-home}/plugins/org.eclipse.test/library.xml"/>
+
+ <!-- This target holds all initialization code that needs to be done for -->
+ <!-- all tests that are to be run. Initialization for individual tests -->
+ <!-- should be done within the body of the suite target. -->
+ <target name="init">
+ <tstamp/>
+ <delete>
+ <fileset dir="${eclipse-home}" includes="org*.xml"/>
+ </delete>
+ </target>
+
+ <!-- This target defines the tests that need to be run. -->
+ <target name="suite">
+ <property name="jdt-folder"
+ value="${eclipse-home}/jdt_folder"/>
+ <delete dir="${jdt-folder}" quiet="true"/>
+ <ant target="ui-test" antfile="${library-file}" dir="${eclipse-home}">
+ <property name="data-dir" value="${jdt-folder}"/>
+ <property name="plugin-name" value="${plugin-name}"/>
+ <property name="classname"
+ value="org.eclipse.ant.tests.ui.testplugin.AntUITests"/>
+ </ant>
+ </target>
+
+ <!-- This target defines the performance tests that need to be run. -->
+ <target name="perfsuite">
+ <property name="jdt-folder"
+ value="${eclipse-home}/jdt_folder"/>
+ <delete dir="${jdt-folder}" quiet="true"/>
+ <ant target="ui-test" antfile="${library-file}" dir="${eclipse-home}">
+ <property name="data-dir" value="${jdt-folder}"/>
+ <property name="plugin-name" value="${plugin-name}"/>
+ <property name="classname"
+ value="org.eclipse.ant.tests.ui.testplugin.AntUIPerformanceTests"/>
+ </ant>
+ </target>
+
+ <!-- This target holds code to cleanup the testing environment after -->
+ <!-- after all of the tests have been run. You can use this target to -->
+ <!-- delete temporary files that have been created. -->
+ <target name="cleanup">
+ </target>
+
+ <!-- This target runs the test suite. Any actions that need to happen -->
+ <!-- after all the tests have been run should go here. -->
+ <target name="run" depends="init,suite,cleanup">
+ <ant target="collect" antfile="${library-file}" dir="${eclipse-home}">
+ <property name="includes" value="org*.xml"/>
+ <property name="output-file" value="${plugin-name}.xml"/>
+ </ant>
+ </target>
+
+ <!--This target runs the performance test suites and collects results.-->
+ <target name="performance" depends="init, perfsuite, cleanup">
+ <ant target="collect" antfile="${library-file}" dir="${eclipse-home}">
+ <property name="includes" value="org*.xml"/>
+ <property name="output-file" value="${plugin-name}.xml"/>
+ </ant>
+ </target>
+
+</project>
diff --git a/ant/org.eclipse.ant.tests.ui/testbuildfiles/102282.xml b/ant/org.eclipse.ant.tests.ui/testbuildfiles/102282.xml
new file mode 100644
index 000000000..b2e13ee29
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/testbuildfiles/102282.xml
@@ -0,0 +1,23 @@
+<!--
+ Copyright (c) 2005, 2006 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
+ -->
+<project name="project" default="default">
+ <target name="default" >
+ <antcall target="antCalled"></antcall>
+ </target>
+ <target name="antCalled">
+ <javac srcdir="src"
+ destdir="dst"
+ classpath="jarfile"
+ debug="on"
+ />
+ </target>
+</project>
+
diff --git a/ant/org.eclipse.ant.tests.ui/testbuildfiles/74840.xml b/ant/org.eclipse.ant.tests.ui/testbuildfiles/74840.xml
new file mode 100644
index 000000000..c61443ff7
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/testbuildfiles/74840.xml
@@ -0,0 +1,5 @@
+<project name="project" default="default">
+ <target name="default">
+ <echo>${platform.location}</echo>
+ </target>
+</project>
diff --git a/ant/org.eclipse.ant.tests.ui/testbuildfiles/85769.xml b/ant/org.eclipse.ant.tests.ui/testbuildfiles/85769.xml
new file mode 100644
index 000000000..eb6222628
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/testbuildfiles/85769.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+
+<project name="debugAntCall"
+ default="default">
+
+ <target name="default">
+ <antcall target="call">
+ </antcall>
+ <echo>default</echo>
+ </target>
+
+ <target name="call" depends="pre-call">
+ <echo>call1</echo>
+ <sleep milliseconds="1500" />
+ </target>
+
+ <target name="pre-call">
+ <echo>pre-call1</echo>
+ </target>
+</project> \ No newline at end of file
diff --git a/ant/org.eclipse.ant.tests.ui/testbuildfiles/89115.xml b/ant/org.eclipse.ant.tests.ui/testbuildfiles/89115.xml
new file mode 100644
index 000000000..541648c49
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/testbuildfiles/89115.xml
@@ -0,0 +1,9 @@
+<project name= "default" default="default">
+ <target description="depends" name="default" depends="depends">
+
+ </target>
+
+ <target name="depends">
+ </target>
+
+</project> \ No newline at end of file
diff --git a/ant/org.eclipse.ant.tests.ui/testbuildfiles/89901.xml b/ant/org.eclipse.ant.tests.ui/testbuildfiles/89901.xml
new file mode 100644
index 000000000..ac3467c60
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/testbuildfiles/89901.xml
@@ -0,0 +1,12 @@
+<project name="project" default="default">
+
+ <target name="default" depends="test" description="--> description">
+ <property name="test" value="yo"/>
+ </target>
+
+ <target name="test">
+ <echo>${test}</echo>
+ </target>
+
+</project>
+
diff --git a/ant/org.eclipse.ant.tests.ui/testbuildfiles/96022.xml b/ant/org.eclipse.ant.tests.ui/testbuildfiles/96022.xml
new file mode 100644
index 000000000..ba44aa887
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/testbuildfiles/96022.xml
@@ -0,0 +1,31 @@
+<project name="debugAntCall"
+ default="default">
+
+ <property name="hey" value="there"/>
+
+ <target name="default">
+ <antcall target="1">
+ </antcall>
+ <echo>default</echo>
+ </target>
+
+ <target name="1" depends="2">
+ <echo>1</echo>
+ <sleep milliseconds="5" />
+ </target>
+
+ <target name="2">
+ <antcall target="3">
+ </antcall>
+ <echo>2</echo>
+ </target>
+
+ <target name="3" depends="4">
+ <echo>3</echo>
+ <sleep milliseconds="5" />
+ </target>
+
+ <target name="4">
+ <echo>4</echo>
+ </target>
+</project> \ No newline at end of file
diff --git a/ant/org.eclipse.ant.tests.ui/testbuildfiles/98853.xml b/ant/org.eclipse.ant.tests.ui/testbuildfiles/98853.xml
new file mode 100644
index 000000000..c9c8fbdc3
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/testbuildfiles/98853.xml
@@ -0,0 +1,27 @@
+<project name="test"
+ default="run-macro"
+ xmlns:xyz="http://xyz">
+
+ <macrodef name="echo-macro"
+ uri="http://xyz">
+ <attribute name="str" />
+ <element name="some-tasks" />
+ <sequential>
+ <echo>@{str}</echo>
+ <some-tasks/>
+ </sequential>
+ </macrodef>
+
+ <target name="run-macro">
+
+ <xyz:echo-macro str="s">
+
+ </xyz:echo-macro>
+ </target>
+
+ <presetdef name="my-javac" uri="http://xyz">
+ <javac fork="yes"></javac>
+ </presetdef>
+
+
+</project> \ No newline at end of file
diff --git a/ant/org.eclipse.ant.tests.ui/testbuildfiles/antUITestsSupport.jar b/ant/org.eclipse.ant.tests.ui/testbuildfiles/antUITestsSupport.jar
new file mode 100644
index 000000000..054eec8ad
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/testbuildfiles/antUITestsSupport.jar
Binary files differ
diff --git a/ant/org.eclipse.ant.tests.ui/testbuildfiles/bad.xml b/ant/org.eclipse.ant.tests.ui/testbuildfiles/bad.xml
new file mode 100644
index 000000000..f1c4d51bf
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/testbuildfiles/bad.xml
@@ -0,0 +1,14 @@
+<project name="Echoing" default="echo1" basedir="..">
+
+ <target name="echo1">
+ <echo messge="echo1"/>
+ </target>
+
+ <target name="echo2">
+ <echo message="echo2"/>
+ </target>
+
+ <target name="echo3" description= "An echo3!">
+ <echo message="echo3"/>
+ </target>
+</project>
diff --git a/ant/org.eclipse.ant.tests.ui/testbuildfiles/badproject.xml b/ant/org.eclipse.ant.tests.ui/testbuildfiles/badproject.xml
new file mode 100644
index 000000000..60a79a89a
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/testbuildfiles/badproject.xml
@@ -0,0 +1,4 @@
+<project ndefault="make">
+ <target name="make">
+ </target>
+</project> \ No newline at end of file
diff --git a/ant/org.eclipse.ant.tests.ui/testbuildfiles/breakpoints.xml b/ant/org.eclipse.ant.tests.ui/testbuildfiles/breakpoints.xml
new file mode 100644
index 000000000..bd6c382f6
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/testbuildfiles/breakpoints.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+
+<project name="debugEcho" default="default">
+ <target name="default">
+ <echo>1</echo>
+ <echo>2</echo>
+ <property name="ZZZ" value="ZZZ" />
+ <sleep milliseconds="5" />
+ <echo>3</echo>
+ <echo>4</echo>
+ <echo>5</echo>
+ <echo>6</echo>
+ <echo>7</echo>
+ <echo>8</echo>
+ <echo>9</echo>
+ <!--<sleep milliseconds="200" />-->
+ </target>
+
+ <target name="entry1" depends="default">
+ <echo>1</echo>
+ <echo>2</echo>
+ </target>
+
+ <target name="entry2" depends="default">
+ <echo>1</echo>
+ <echo>2</echo>
+ </target>
+
+ <target name="properties">
+ <property name="AAA" value="aaa" />
+ <property name="BBB" value="bbb" />
+ <property name="CCC" value="ccc" />
+ <echo>all done</echo>
+ </target>
+
+ <property name="name" value="value"/>
+</project> \ No newline at end of file
diff --git a/ant/org.eclipse.ant.tests.ui/testbuildfiles/build.Cp1251.xml b/ant/org.eclipse.ant.tests.ui/testbuildfiles/build.Cp1251.xml
new file mode 100644
index 000000000..6ff953999
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/testbuildfiles/build.Cp1251.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="windows-1251"?>
+<project name="test" default="init" basedir=".">
+
+ <target name="init">
+ <!-- displays Hello in Russian -->
+ <echo message="Çäðàâñòâóéòå"/>
+ </target>
+
+
+</project>
diff --git a/ant/org.eclipse.ant.tests.ui/testbuildfiles/build.UTF8.xml b/ant/org.eclipse.ant.tests.ui/testbuildfiles/build.UTF8.xml
new file mode 100644
index 000000000..08e4733f1
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/testbuildfiles/build.UTF8.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="test" default="init" basedir=".">
+
+ <target name="init">
+ <!-- displays Hello in Russian -->
+ <echo message="ЗдравÑ?твуйте"/>
+ </target>
+
+</project>
diff --git a/ant/org.eclipse.ant.tests.ui/testbuildfiles/build.xml b/ant/org.eclipse.ant.tests.ui/testbuildfiles/build.xml
new file mode 100644
index 000000000..5cdd64da7
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/testbuildfiles/build.xml
@@ -0,0 +1,14 @@
+<project name="Echoing" default="echo1" basedir="..">
+
+ <target name="echo1">
+ <echo message="echo1"/>
+ </target>
+
+ <target name="echo2">
+ <echo message="echo2"/>
+ </target>
+
+ <target name="echo3" description= "An echo3!">
+ <echo message="echo3"/>
+ </target>
+</project>
diff --git a/ant/org.eclipse.ant.tests.ui/testbuildfiles/buildtest1.properties b/ant/org.eclipse.ant.tests.ui/testbuildfiles/buildtest1.properties
new file mode 100644
index 000000000..a7c3ef197
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/testbuildfiles/buildtest1.properties
@@ -0,0 +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:
+# IBM Corporation - initial API and implementation
+###############################################################################
+prop1=val1
+prop2 = val2
+importFileName= toBeImported.xml
diff --git a/ant/org.eclipse.ant.tests.ui/testbuildfiles/buildtest1.xml b/ant/org.eclipse.ant.tests.ui/testbuildfiles/buildtest1.xml
new file mode 100644
index 000000000..9e042ff45
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/testbuildfiles/buildtest1.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="testproject" basedir="." default="main">
+ <property name="propD" value="valD" />
+ <property file="buildtest1.properties" />
+ <property name="propV" value="valV" />
+ <target name="main">
+ <property name="property_in_target" value="val"/>
+ <echo>${</echo>
+ </target>
+ <target name="pretest"></target>
+ <target name="test" depends="">
+ <echo>depends</echo>
+ </target>
+ <target name="test2"></target>
+ <target name="test3"></target>
+ <target name="testIf" if=""></target>
+ <target name="testUnless" unless="prop"></target>
+ <target name="testMoreDepends" depends="pretest, ">
+ <echo message="$"></echo>
+ </target>
+</project> \ No newline at end of file
diff --git a/ant/org.eclipse.ant.tests.ui/testbuildfiles/buildtest2.xml b/ant/org.eclipse.ant.tests.ui/testbuildfiles/buildtest2.xml
new file mode 100644
index 000000000..01e31c237
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/testbuildfiles/buildtest2.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="testproject" basedir="." default="main">
+ <property name="propD" value="valD" />
+ <property file="buildtest1.properties" />
+ <target name="main" depends="properties"> \ No newline at end of file
diff --git a/ant/org.eclipse.ant.tests.ui/testbuildfiles/buildtest3.xml b/ant/org.eclipse.ant.tests.ui/testbuildfiles/buildtest3.xml
new file mode 100644
index 000000000..7579dc457
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/testbuildfiles/buildtest3.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="testproject" basedir="." default="main">
+ <target name="main" />
+ <target name="pretest" description="description">
+ </target>
+ <target name="test" depends="">
+ <echo>depends</echo>
+ </target>
+ <target name="test2" />
+</project> \ No newline at end of file
diff --git a/ant/org.eclipse.ant.tests.ui/testbuildfiles/buildtest4.xml b/ant/org.eclipse.ant.tests.ui/testbuildfiles/buildtest4.xml
new file mode 100644
index 000000000..153b9f1fd
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/testbuildfiles/buildtest4.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project default="task3">
+ <target name="task" description=""/>
+ <target name="task2">
+ <antcall target=""></antcall>
+ </target>
+ <target name="task3" depends=""/>
+</project> \ No newline at end of file
diff --git a/ant/org.eclipse.ant.tests.ui/testbuildfiles/customBoolean.xml b/ant/org.eclipse.ant.tests.ui/testbuildfiles/customBoolean.xml
new file mode 100644
index 000000000..1dd37a02a
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/testbuildfiles/customBoolean.xml
@@ -0,0 +1,5 @@
+<project default="defaultTargetName">
+ <target name="defaultTargetName">
+ <eclipse.buildScript recursivegeneration=""/>
+ </target>
+</project>
diff --git a/ant/org.eclipse.ant.tests.ui/testbuildfiles/debugAntCall.xml b/ant/org.eclipse.ant.tests.ui/testbuildfiles/debugAntCall.xml
new file mode 100644
index 000000000..868a486ec
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/testbuildfiles/debugAntCall.xml
@@ -0,0 +1,18 @@
+<project name="debugAntCall"
+ default="default">
+
+ <target name="default">
+ <antcall target="call">
+ </antcall>
+ <echo>default</echo>
+ </target>
+
+ <target name="call" depends="pre-call">
+ <echo>call1</echo>
+ <sleep milliseconds="30" />
+ </target>
+
+ <target name="pre-call">
+ <echo>pre-call1</echo>
+ </target>
+</project> \ No newline at end of file
diff --git a/ant/org.eclipse.ant.tests.ui/testbuildfiles/dependencytest.xml b/ant/org.eclipse.ant.tests.ui/testbuildfiles/dependencytest.xml
new file mode 100644
index 000000000..d26ba5769
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/testbuildfiles/dependencytest.xml
@@ -0,0 +1,38 @@
+<!-- Ein test case sollte die property proposals in main -->
+<!-- Ueberpruefen, und ob die diversen properties entsprechend -->
+<!-- der dependencies gesetzt sind -->
+
+<project default="main">
+
+ <property name="do_init" value="val"></property>
+
+ <target name="properties">
+ <property name="prop_prop" value="val"></property>
+ <property name="do_not_compile" value="val"></property>
+ <echo message="executing properties"></echo>
+ </target>
+
+ <!-- should never be executed since property is not set -->
+ <target name="additional_properties" if="do_addit_props">
+ <property name="adit_prop" value="val" />
+ <echo message="executing additional_properties"></echo>
+ </target>
+
+ <target name="init" if="doinit" depends="properties,additional_properties">
+ <property name="init_prop" value="val"></property>
+ <echo message="executing init"></echo>
+ </target>
+
+ <!-- should never be executed since property should be set -->
+ <!-- by properties because of dependencies before -->
+ <target name="compile" unless="do_not_compile">
+ <property name="compile_prop" value="val"></property>
+ <echo message="executing compile"></echo>
+ </target>
+
+ <target name="main" depends="init, compile">
+ <property name="main_prop" value="val"></property>
+ <echo message="executing main ${well}"></echo>
+ </target>
+
+</project> \ No newline at end of file
diff --git a/ant/org.eclipse.ant.tests.ui/testbuildfiles/echoProperties.xml b/ant/org.eclipse.ant.tests.ui/testbuildfiles/echoProperties.xml
new file mode 100644
index 000000000..6473c6567
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/testbuildfiles/echoProperties.xml
@@ -0,0 +1,6 @@
+<project name="Echoing properties" default="echo1" basedir="..">
+ <target name="echo1">
+ <echo message="about to echo properties"/>
+ <echoproperties/>
+ </target>
+</project>
diff --git a/ant/org.eclipse.ant.tests.ui/testbuildfiles/echoing.xml b/ant/org.eclipse.ant.tests.ui/testbuildfiles/echoing.xml
new file mode 100644
index 000000000..97b498461
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/testbuildfiles/echoing.xml
@@ -0,0 +1,19 @@
+<project name="Echoing" default="echo1" basedir="..">
+
+ <target name="echo1">
+ <echo message="echo1"/>
+ </target>
+
+ <target name="echo2">
+ <echo message="echo2"/>
+ </target>
+
+ <target name="echo3" description= "An echo3!">
+ <echo message="echo3"/>
+ </target>
+
+ <target name="Bug42984">
+ <echo message="user.dir: ${user.dir}"/>
+ </target>
+
+</project>
diff --git a/ant/org.eclipse.ant.tests.ui/testbuildfiles/empty.xml b/ant/org.eclipse.ant.tests.ui/testbuildfiles/empty.xml
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/testbuildfiles/empty.xml
diff --git a/ant/org.eclipse.ant.tests.ui/testbuildfiles/environmentVar.xml b/ant/org.eclipse.ant.tests.ui/testbuildfiles/environmentVar.xml
new file mode 100644
index 000000000..a88443223
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/testbuildfiles/environmentVar.xml
@@ -0,0 +1,5 @@
+<project>
+ <property environment="env"/>
+ <echo>${env.ANT_HOME}</echo>
+ <echo>${ant.home}</echo>
+</project> \ No newline at end of file
diff --git a/ant/org.eclipse.ant.tests.ui/testbuildfiles/extensionPointSepVM.xml b/ant/org.eclipse.ant.tests.ui/testbuildfiles/extensionPointSepVM.xml
new file mode 100644
index 000000000..2735ed092
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/testbuildfiles/extensionPointSepVM.xml
@@ -0,0 +1,14 @@
+<project name="Extension point testing in separate VM"
+ default="Extension Points"
+ basedir="."
+ >
+ <taskdef name="separateVMTask" classname="org.eclipse.ant.tests.ui.support.tasks.AntTestTask">
+ </taskdef>
+ <target name="Extension Points"
+ description= "Ensure that an extra classpath entry designated as not requiring the Eclipse runtime shows up in a separate VM build"
+ >
+ <separateVMTask/>
+ <echo>${property.ui.testing}</echo>
+ <echo>${property.ui.testing2}</echo>
+ </target>
+</project>
diff --git a/ant/org.eclipse.ant.tests.ui/testbuildfiles/extensionPointTaskSepVM.xml b/ant/org.eclipse.ant.tests.ui/testbuildfiles/extensionPointTaskSepVM.xml
new file mode 100644
index 000000000..ec6c6aa3d
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/testbuildfiles/extensionPointTaskSepVM.xml
@@ -0,0 +1,6 @@
+<project name="Extension Point Task" default="Extension Point Task" basedir=".">
+ <target name="Extension Point Task" description= "Ensure that an extension point defined task is present">
+ <coolUITask message="cool" reference=""/>
+ <my:coolUITask xmlns:my="testing"/>
+ </target>
+</project> \ No newline at end of file
diff --git a/ant/org.eclipse.ant.tests.ui/testbuildfiles/extensionPointTypeSepVM.xml b/ant/org.eclipse.ant.tests.ui/testbuildfiles/extensionPointTypeSepVM.xml
new file mode 100644
index 000000000..bba955e35
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/testbuildfiles/extensionPointTypeSepVM.xml
@@ -0,0 +1,12 @@
+<project name="Extension Point Type" default="Extension Point Type" basedir=".">
+
+ <coolUIType id="compile.classpath">
+ <fileset dir="lib">
+ <include name="**/*.jar"/>
+ </fileset>
+ </coolUIType>
+
+ <target name="Extension Point Type" description= "Ensure that an extension point defined type is present">
+ <echo message="Ensure that an extension point defined type is present"/>
+ </target>
+</project>
diff --git a/ant/org.eclipse.ant.tests.ui/testbuildfiles/failingTarget.xml b/ant/org.eclipse.ant.tests.ui/testbuildfiles/failingTarget.xml
new file mode 100644
index 000000000..04418e08a
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/testbuildfiles/failingTarget.xml
@@ -0,0 +1,9 @@
+<project default="all">
+ <target name="all" depends="fails, echos"/>
+ <target name="fails">
+ <jar jarfile="jar16.jar" basedir="doesNotExist"/>
+ </target>
+ <target name="echos">
+ <echo>Still echo on failure</echo>
+ </target>
+</project> \ No newline at end of file
diff --git a/ant/org.eclipse.ant.tests.ui/testbuildfiles/formatTest_source01.xml b/ant/org.eclipse.ant.tests.ui/testbuildfiles/formatTest_source01.xml
new file mode 100644
index 000000000..2732a49a6
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/testbuildfiles/formatTest_source01.xml
@@ -0,0 +1,24 @@
+<!--
+ Copyright (c) 2005, 2006 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
+ -->
+<project default="formatTest">
+
+<!-- = = = = = = --><!-- formatTest --><!-- = = = = = = --><target name="formatTest" depends="init" description="--> test target one"><!-- hello world --><greeting /></target>
+
+<!-- - - - - - - -->
+<!-- init -->
+<!-- - - - - - - -->
+<target name="init">
+ <property name="greeting" value="hi" />
+ <presetdef name="greeting"><echo>${greeting}</echo>
+</presetdef>
+ </target>
+
+</project> \ No newline at end of file
diff --git a/ant/org.eclipse.ant.tests.ui/testbuildfiles/formatTest_target01.xml b/ant/org.eclipse.ant.tests.ui/testbuildfiles/formatTest_target01.xml
new file mode 100644
index 000000000..e985e8540
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/testbuildfiles/formatTest_target01.xml
@@ -0,0 +1,31 @@
+<!--
+ Copyright (c) 2005, 2006 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
+ -->
+<project default="formatTest">
+
+ <!-- = = = = = = -->
+ <!-- formatTest -->
+ <!-- = = = = = = -->
+ <target name="formatTest" depends="init" description="--> test target one">
+ <!-- hello world -->
+ <greeting />
+ </target>
+
+ <!-- - - - - - - -->
+ <!-- init -->
+ <!-- - - - - - - -->
+ <target name="init">
+ <property name="greeting" value="hi" />
+ <presetdef name="greeting">
+ <echo>${greeting}</echo>
+ </presetdef>
+ </target>
+
+</project> \ No newline at end of file
diff --git a/ant/org.eclipse.ant.tests.ui/testbuildfiles/formatTest_target02.xml b/ant/org.eclipse.ant.tests.ui/testbuildfiles/formatTest_target02.xml
new file mode 100644
index 000000000..0798275f5
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/testbuildfiles/formatTest_target02.xml
@@ -0,0 +1,31 @@
+<!--
+ Copyright (c) 2005, 2006 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
+ -->
+<project default="formatTest">
+
+ <!-- = = = = = = -->
+ <!-- formatTest -->
+ <!-- = = = = = = -->
+ <target name="formatTest" depends="init" description="--> test target one">
+ <!-- hello world -->
+ <greeting />
+ </target>
+
+ <!-- - - - - - - -->
+ <!-- init -->
+ <!-- - - - - - - -->
+ <target name="init">
+ <property name="greeting" value="hi" />
+ <presetdef name="greeting">
+ <echo>${greeting}</echo>
+ </presetdef>
+ </target>
+
+</project> \ No newline at end of file
diff --git a/ant/org.eclipse.ant.tests.ui/testbuildfiles/formatTest_target03.xml b/ant/org.eclipse.ant.tests.ui/testbuildfiles/formatTest_target03.xml
new file mode 100644
index 000000000..9ad51b905
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/testbuildfiles/formatTest_target03.xml
@@ -0,0 +1,31 @@
+<!--
+ Copyright (c) 2005, 2006 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
+ -->
+<project default="formatTest">
+
+ <!-- = = = = = = -->
+ <!-- formatTest -->
+ <!-- = = = = = = -->
+ <target name="formatTest" depends="init" description="--> test target one">
+ <!-- hello world -->
+ <greeting />
+ </target>
+
+ <!-- - - - - - - -->
+ <!-- init -->
+ <!-- - - - - - - -->
+ <target name="init">
+ <property name="greeting" value="hi" />
+ <presetdef name="greeting">
+ <echo>${greeting}</echo>
+ </presetdef>
+ </target>
+
+</project> \ No newline at end of file
diff --git a/ant/org.eclipse.ant.tests.ui/testbuildfiles/import.xml b/ant/org.eclipse.ant.tests.ui/testbuildfiles/import.xml
new file mode 100644
index 000000000..fd75a8129
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/testbuildfiles/import.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?> <!--
+ Copyright (c) 2005, 2006 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
+ -->
+
+<project name="importRequiringUserProperties" default="import-default">
+ <description>${importFileName to be defined as an argument, config property or in a config property file</description>
+ <import file="toBeImported.xml" />
+ <target name="one" depends="import-default">
+ <echo>one</echo>
+ </target>
+
+</project>
+
diff --git a/ant/org.eclipse.ant.tests.ui/testbuildfiles/importRequiringUserProp.xml b/ant/org.eclipse.ant.tests.ui/testbuildfiles/importRequiringUserProp.xml
new file mode 100644
index 000000000..18a12714f
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/testbuildfiles/importRequiringUserProp.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<project name="importRequiringUserProperties" default="import-default">
+ <description>${importFileName to be defined as an argument, config property or in a config property file</description>
+ <import file="${importFileName}" />
+ <target name="one" depends="import-default">
+ <echo>one</echo>
+ </target>
+
+</project>
+
diff --git a/ant/org.eclipse.ant.tests.ui/testbuildfiles/importWithByteOrderMark.xml b/ant/org.eclipse.ant.tests.ui/testbuildfiles/importWithByteOrderMark.xml
new file mode 100644
index 000000000..f6862ae06
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/testbuildfiles/importWithByteOrderMark.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?> <!--
+ Copyright (c) 2005, 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:
+ IBM Corporation - initial API and implementation
+ -->
+
+<project basedir="." name="dist" default="dist">
+ <import file="toBeImportedWithByteOrderMark.xml" />
+
+ <target name="dist" depends="build">
+ <echo message="echo - dist" />
+ </target>
+</project>
diff --git a/ant/org.eclipse.ant.tests.ui/testbuildfiles/input.xml b/ant/org.eclipse.ant.tests.ui/testbuildfiles/input.xml
new file mode 100644
index 000000000..8d70ab5f4
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/testbuildfiles/input.xml
@@ -0,0 +1,7 @@
+<project name="input testing" default= "input test">
+ <target name="input test">
+ <input message="Enter for echo" addproperty= "inputTest">
+ </input>
+ <echo message="${inputTest}"/>
+ </target>
+</project> \ No newline at end of file
diff --git a/ant/org.eclipse.ant.tests.ui/testbuildfiles/internalTargets.xml b/ant/org.eclipse.ant.tests.ui/testbuildfiles/internalTargets.xml
new file mode 100644
index 000000000..641125368
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/testbuildfiles/internalTargets.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="project" default="-default">
+ <target name="internal1">
+ <!-- internal because does it does not have description attribute -->
+ </target>
+
+ <target name="-internal2" description="something">
+ <!-- internal because it has name starting with '-' -->
+ </target>
+
+ <target name="non-internal" description="something">
+ <!-- non internal because it has description attribute -->
+ </target>
+
+ <target name="-default" depends="internal1,-internal2,non-internal">
+ <!-- non-internal target because it is default target -->
+ </target>
+</project>
diff --git a/ant/org.eclipse.ant.tests.ui/testbuildfiles/javac.xml b/ant/org.eclipse.ant.tests.ui/testbuildfiles/javac.xml
new file mode 100644
index 000000000..61e00c2c4
--- /dev/null
+++ b/ant/org.eclipse.ant.tests.ui/testbuildfiles/javac.xml
@@ -0,0 +1,7 @@
+<project default="javacIt">
+ <target name="javacIt">