Skip to content

Commits on Source 5

......@@ -20,9 +20,9 @@ Information regarding source code management, builds, coding standards, and more
Contributor License Agreement:
------------------------------
Before your contribution can be accepted by the project, you need to create and electronically sign the Eclipse Foundation Contributor License Agreement (CLA).
Before your contribution can be accepted by the project, you need to create and electronically sign the Eclipse Foundation Contributor License Agreement (ECA).
- http://www.eclipse.org/legal/CLA.php
- http://www.eclipse.org/legal/ECA.php
Contact:
--------
......
......@@ -80,6 +80,7 @@
<pathelement path="/usr/share/java/eclipse-ui-workbench.jar"/>
<pathelement path="/usr/share/java/eclipse-ui-workbench-texteditor.jar"/>
<pathelement path="/usr/share/java/equinox-common.jar"/>
<pathelement path="/usr/share/java/equinox-preferences.jar"/>
<pathelement path="/usr/share/java/equinox-registry.jar"/>
<pathelement path="/usr/share/java/icu4j.jar"/>
<pathelement path="/usr/share/java/swt4.jar"/>
......
eclipse-platform-debug (4.8-1) unstable; urgency=medium
* New upstream release
- Depend on libswt-gtk-4-java (>= 4.8)
- Added equinox-preferences to the classpath of org.eclipse.ui.console
-- Emmanuel Bourg <ebourg@apache.org> Wed, 28 Nov 2018 00:25:26 +0100
eclipse-platform-debug (4.7.3-1) unstable; urgency=medium
* Initial release (Closes: #909610)
......
......@@ -28,7 +28,7 @@ Build-Depends:
libequinox-preferences-java,
libequinox-registry-java,
libicu4j-java,
libswt-gtk-4-java
libswt-gtk-4-java (>= 4.8)
Standards-Version: 4.2.1
Vcs-Git: https://salsa.debian.org/java-team/eclipse-platform-debug.git
Vcs-Browser: https://salsa.debian.org/java-team/eclipse-platform-debug
......@@ -173,8 +173,10 @@ Depends:
libeclipse-ui-workbench-java,
libeclipse-ui-workbench-texteditor-java,
libequinox-common-java,
libequinox-preferences-java,
libequinox-registry-java,
libicu4j-java
libicu4j-java,
libswt-gtk-4-java (>= 4.8)
Description: Eclipse Console
The Debug component of the Eclipse platform defines language independent
facilities and mechanisms for:
......
......@@ -27,6 +27,7 @@ org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.doc.comment.support=enabled
org.eclipse.jdt.core.compiler.maxProblemPerUnit=100
org.eclipse.jdt.core.compiler.problem.APILeak=warning
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
......@@ -91,7 +92,7 @@ org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning
org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warning
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
......@@ -101,12 +102,16 @@ org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=enabled
org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
org.eclipse.jdt.core.compiler.problem.terminalDeprecation=warning
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=error
org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=warning
org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=disabled
org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=info
org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
......
......@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-Localization: plugin
Bundle-SymbolicName: org.eclipse.core.externaltools;singleton:=true
Bundle-Version: 1.1.0.qualifier
Bundle-Version: 1.1.100.qualifier
Bundle-Activator: org.eclipse.core.externaltools.internal.ExternalToolsCore
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)",
org.eclipse.debug.core;bundle-version="[3.9.0,4.0.0)",
......@@ -16,3 +16,4 @@ Export-Package: org.eclipse.core.externaltools.internal;x-friends:="org.eclipse.
org.eclipse.core.externaltools.internal.launchConfigurations;x-friends:="org.eclipse.ant.launching,org.eclipse.ui.externaltools",
org.eclipse.core.externaltools.internal.model;x-friends:="org.eclipse.ant.launching,org.eclipse.ui.externaltools,org.eclipse.ant.ui",
org.eclipse.core.externaltools.internal.registry;x-friends:="org.eclipse.ui.externaltools"
Automatic-Module-Name: org.eclipse.core.externaltools
......@@ -14,10 +14,10 @@
<parent>
<artifactId>eclipse.platform.debug</artifactId>
<groupId>eclipse.platform.debug</groupId>
<version>4.7.3-SNAPSHOT</version>
<version>4.8.0-SNAPSHOT</version>
</parent>
<groupId>org.eclipse.core</groupId>
<artifactId>org.eclipse.core.externaltools</artifactId>
<version>1.1.0-SNAPSHOT</version>
<version>1.1.100-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
/*******************************************************************************
* Copyright (c) 2000, 2013 IBM Corporation and others.
* Copyright (c) 2000, 2018 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
......@@ -111,7 +111,7 @@ public class ProgramLaunchDelegate extends LaunchConfigurationDelegate {
IProcess process = null;
// add process type to process attributes
Map<String, String> processAttributes = new HashMap<String, String>();
Map<String, String> processAttributes = new HashMap<>();
String programName = location.lastSegment();
String extension = location.getFileExtension();
if (extension != null) {
......@@ -169,11 +169,11 @@ public class ProgramLaunchDelegate extends LaunchConfigurationDelegate {
if (commandLine.length < 1) {
return IExternalToolConstants.EMPTY_STRING;
}
StringBuffer buf = new StringBuffer();
StringBuilder buf = new StringBuilder();
for (int i = 0; i < commandLine.length; i++) {
buf.append(' ');
char[] characters = commandLine[i].toCharArray();
StringBuffer command = new StringBuffer();
StringBuilder command = new StringBuilder();
boolean containsSpace = false;
for (int j = 0; j < characters.length; j++) {
char character = characters[j];
......
/*******************************************************************************
* Copyright (c) 2000, 2014 IBM Corporation and others.
* Copyright (c) 2000, 2018 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
......@@ -149,7 +149,7 @@ public class BuilderCoreUtils {
if(!isfull && isinc) {
Map<String, String> args = newCommand.getArguments();
if(args == null) {
args = new HashMap<String, String>();
args = new HashMap<>();
}
newCommand.setBuilding(IncrementalProjectBuilder.FULL_BUILD, true);
args.put(INC_CLEAN, Boolean.TRUE.toString());
......@@ -211,10 +211,10 @@ public class BuilderCoreUtils {
temp = workingCopy.getOriginal();
}
}
args = new HashMap<String, String>();
args = new HashMap<>();
// Launch configuration builders are stored with a project-relative
// path
StringBuffer buffer = new StringBuffer(PROJECT_TAG);
StringBuilder buffer = new StringBuilder(PROJECT_TAG);
// Append the project-relative path (workspace path minus first
// segment)
buffer.append('/').append(temp.getFile().getFullPath().removeFirstSegments(1));
......
/*******************************************************************************
* Copyright (c) 2000, 2013 IBM Corporation and others.
* Copyright (c) 2000, 2018 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
......@@ -247,8 +247,8 @@ public final class ExternalToolMigration {
String targetNames = null;
if (arguments != null) {
int start = 0;
ArrayList<String> targets = new ArrayList<String>();
StringBuffer buffer = new StringBuffer();
ArrayList<String> targets = new ArrayList<>();
StringBuilder buffer = new StringBuilder();
VariableDefinition varDef = extractVariableDefinition(arguments, start);
while (varDef.end != -1) {
if ("ant_target".equals(varDef.name) && varDef.argument != null) { //$NON-NLS-1$
......
......@@ -27,6 +27,7 @@ org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.doc.comment.support=enabled
org.eclipse.jdt.core.compiler.maxProblemPerUnit=100
org.eclipse.jdt.core.compiler.problem.APILeak=warning
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
......@@ -77,19 +78,21 @@ org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=error
org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning
org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
org.eclipse.jdt.core.compiler.problem.nullReference=error
org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
org.eclipse.jdt.core.compiler.problem.parameterAssignment=warning
org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning
org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning
org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warning
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
......@@ -99,12 +102,16 @@ org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=enabled
org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
org.eclipse.jdt.core.compiler.problem.terminalDeprecation=warning
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=error
org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=warning
org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=disabled
org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=info
org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
......
......@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.core.variables; singleton:=true
Bundle-Version: 3.4.0.qualifier
Bundle-Version: 3.4.100.qualifier
Bundle-Activator: org.eclipse.core.variables.VariablesPlugin
Bundle-Vendor: %providerName
Bundle-Localization: plugin
......@@ -11,3 +11,4 @@ Export-Package: org.eclipse.core.internal.variables;x-internal:=true,
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.3.0,4.0.0)"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Automatic-Module-Name: org.eclipse.core.variables
......@@ -14,10 +14,10 @@
<parent>
<artifactId>eclipse.platform.debug</artifactId>
<groupId>eclipse.platform.debug</groupId>
<version>4.7.3-SNAPSHOT</version>
<version>4.8.0-SNAPSHOT</version>
</parent>
<groupId>org.eclipse.core</groupId>
<artifactId>org.eclipse.core.variables</artifactId>
<version>3.4.0-SNAPSHOT</version>
<version>3.4.100-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
......@@ -40,7 +40,7 @@ public class StringSubstitutionEngine {
/**
* Resulting string
*/
private StringBuffer fResult;
private StringBuilder fResult;
/**
* Whether substitutions were performed
......@@ -55,10 +55,10 @@ public class StringSubstitutionEngine {
class VariableReference {
// the text inside the variable reference
private StringBuffer fText;
private StringBuilder fText;
public VariableReference() {
fText = new StringBuffer();
fText = new StringBuilder();
}
public void append(String text) {
......@@ -95,7 +95,7 @@ public class StringSubstitutionEngine {
for (; i<resolvedVariableSets.size(); i++) {
conflictingSet.addAll(resolvedVariableSets.get(i));
}
StringBuffer problemVariableList = new StringBuffer();
StringBuilder problemVariableList = new StringBuilder();
for (String string : conflictingSet) {
problemVariableList.append(string);
problemVariableList.append(", "); //$NON-NLS-1$
......@@ -134,7 +134,7 @@ public class StringSubstitutionEngine {
* @exception CoreException if unable to resolve a variable
*/
private HashSet<String> substitute(String expression, boolean reportUndefinedVariables, boolean resolveVariables, IStringVariableManager manager) throws CoreException {
fResult = new StringBuffer(expression.length());
fResult = new StringBuilder(expression.length());
fStack = new Stack<>();
fSubs = false;
......@@ -285,7 +285,7 @@ public class StringSubstitutionEngine {
}
private String getOriginalVarText(VariableReference var) {
StringBuffer res = new StringBuffer(var.getText());
StringBuilder res = new StringBuilder(var.getText());
res.insert(0, VARIABLE_START);
res.append(VARIABLE_END);
return res.toString();
......
/*******************************************************************************
* Copyright (c) 2000, 2016 IBM Corporation and others.
* Copyright (c) 2000, 2018 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
......@@ -15,6 +15,7 @@ import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
......@@ -278,7 +279,7 @@ public class StringVariableManager implements IStringVariableManager, IPreferenc
}
Element root= null;
try {
ByteArrayInputStream stream = new ByteArrayInputStream(variablesString.getBytes("UTF-8")); //$NON-NLS-1$
ByteArrayInputStream stream = new ByteArrayInputStream(variablesString.getBytes(StandardCharsets.UTF_8));
DocumentBuilder parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();
parser.setErrorHandler(new DefaultHandler());
root = parser.parse(stream).getDocumentElement();
......@@ -572,7 +573,7 @@ public class StringVariableManager implements IStringVariableManager, IPreferenc
*/
@Override
public String generateVariableExpression(String varName, String arg) {
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append("${"); //$NON-NLS-1$
buffer.append(varName);
if (arg != null) {
......
......@@ -27,6 +27,7 @@ org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.doc.comment.support=enabled
org.eclipse.jdt.core.compiler.maxProblemPerUnit=100
org.eclipse.jdt.core.compiler.problem.APILeak=warning
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
......@@ -91,7 +92,7 @@ org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning
org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warning
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
......@@ -101,12 +102,16 @@ org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=enabled
org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
org.eclipse.jdt.core.compiler.problem.terminalDeprecation=warning
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=error
org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=warning
org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=disabled
org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=info
org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
......
......@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.debug.core; singleton:=true
Bundle-Version: 3.11.0.qualifier
Bundle-Version: 3.12.0.qualifier
Bundle-ClassPath: .
Bundle-Activator: org.eclipse.debug.core.DebugPlugin
Bundle-Vendor: %providerName
......@@ -27,3 +27,4 @@ Require-Bundle: org.eclipse.core.resources;bundle-version="[3.9.0,4.0.0)";visibi
Bundle-ActivationPolicy: lazy
Import-Package: com.ibm.icu.text
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Automatic-Module-Name: org.eclipse.debug.core
......@@ -383,7 +383,7 @@ public final class DebugEvent extends EventObject {
*/
@Override
public String toString() {
StringBuffer buf = new StringBuffer("DebugEvent["); //$NON-NLS-1$
StringBuilder buf = new StringBuilder("DebugEvent["); //$NON-NLS-1$
if (getSource() != null) {
buf.append(getSource().toString());
} else {
......
/*******************************************************************************
* Copyright (c) 2000, 2016 IBM Corporation and others.
* Copyright (c) 2000, 2018 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
......@@ -16,6 +16,7 @@ import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
......@@ -397,7 +398,7 @@ public class DebugPlugin extends Plugin {
*
* @since 3.1
*/
private List<Object> fEventQueue = new ArrayList<Object>();
private List<Object> fEventQueue = new ArrayList<>();
/**
* Job to fire events to listeners.
......@@ -423,9 +424,7 @@ public class DebugPlugin extends Plugin {
setPriority(Job.INTERACTIVE);
setSystem(true);
}
/* (non-Javadoc)
* @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor)
*/
@Override
protected IStatus run(IProgressMonitor monitor) {
......@@ -445,16 +444,11 @@ public class DebugPlugin extends Plugin {
return Status.OK_STATUS;
}
/* (non-Javadoc)
* @see org.eclipse.core.runtime.jobs.Job#shouldRun()
*/
@Override
public boolean shouldRun() {
return shouldSchedule();
}
/* (non-Javadoc)
* @see org.eclipse.core.internal.jobs.InternalJob#shouldSchedule()
*/
@Override
public boolean shouldSchedule() {
return !(isShuttingDown() || fEventListeners.isEmpty());
......@@ -679,9 +673,6 @@ public class DebugPlugin extends Plugin {
}
}
/* (non-Javadoc)
* @see org.eclipse.core.runtime.Plugin#start(org.osgi.framework.BundleContext)
*/
@Override
public void start(BundleContext context) throws Exception {
super.start(context);
......@@ -1001,7 +992,7 @@ public class DebugPlugin extends Plugin {
private void initializeStatusHandlers() {
IExtensionPoint extensionPoint = Platform.getExtensionRegistry().getExtensionPoint(DebugPlugin.PI_DEBUG_CORE, EXTENSION_POINT_STATUS_HANDLERS);
IConfigurationElement[] infos= extensionPoint.getConfigurationElements();
fStatusHandlers = new HashMap<StatusHandlerKey, IConfigurationElement>(infos.length);
fStatusHandlers = new HashMap<>(infos.length);
for (int i= 0; i < infos.length; i++) {
IConfigurationElement configurationElement = infos[i];
String id = configurationElement.getAttribute("plugin"); //$NON-NLS-1$
......@@ -1029,7 +1020,7 @@ public class DebugPlugin extends Plugin {
private void initializeProcessFactories() {
IExtensionPoint extensionPoint = Platform.getExtensionRegistry().getExtensionPoint(DebugPlugin.PI_DEBUG_CORE, EXTENSION_POINT_PROCESS_FACTORIES);
IConfigurationElement[] infos= extensionPoint.getConfigurationElements();
fProcessFactories = new HashMap<String, IConfigurationElement>(infos.length);
fProcessFactories = new HashMap<>(infos.length);
for (int i= 0; i < infos.length; i++) {
IConfigurationElement configurationElement = infos[i];
String id = configurationElement.getAttribute("id"); //$NON-NLS-1$
......@@ -1093,18 +1084,12 @@ public class DebugPlugin extends Plugin {
}
/* (non-Javadoc)
* @see org.eclipse.core.runtime.ISafeRunnable#handleException(java.lang.Throwable)
*/
@Override
public void handleException(Throwable exception) {
IStatus status = new Status(IStatus.ERROR, getUniqueIdentifier(), ERROR, DebugCoreMessages.DebugPlugin_6, exception);
log(status);
}
/* (non-Javadoc)
* @see org.eclipse.core.runtime.ISafeRunnable#run()
*/
@Override
public void run() throws Exception {
fRunnable.run();
......@@ -1123,9 +1108,6 @@ public class DebugPlugin extends Plugin {
private IDebugEventFilter fFilter;
private int fMode;
/**
* @see org.eclipse.core.runtime.ISafeRunnable#handleException(java.lang.Throwable)
*/
@Override
public void handleException(Throwable exception) {
switch (fMode) {
......@@ -1142,9 +1124,6 @@ public class DebugPlugin extends Plugin {
}
}
/**
* @see org.eclipse.core.runtime.ISafeRunnable#run()
*/
@Override
public void run() throws Exception {
switch (fMode) {
......@@ -1245,7 +1224,7 @@ public class DebugPlugin extends Plugin {
try{
DocumentBuilder parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();
parser.setErrorHandler(new DefaultHandler());
stream = new ByteArrayInputStream(document.getBytes("UTF8")); //$NON-NLS-1$
stream = new ByteArrayInputStream(document.getBytes(StandardCharsets.UTF_8));
root = parser.parse(stream).getDocumentElement();
} catch (ParserConfigurationException e) {
abort("Unable to parse XML document.", e); //$NON-NLS-1$
......@@ -1281,7 +1260,7 @@ public class DebugPlugin extends Plugin {
private static String[] parseArgumentsWindows(String args, boolean split) {
// see http://msdn.microsoft.com/en-us/library/a1y7w461.aspx
List<String> result = new ArrayList<String>();
List<String> result = new ArrayList<>();
final int DEFAULT= 0;
final int ARG= 1;
......@@ -1289,7 +1268,7 @@ public class DebugPlugin extends Plugin {
int state= DEFAULT;
int backslashes= 0;
StringBuffer buf= new StringBuffer();
StringBuilder buf= new StringBuilder();
int len= args.length();
for (int i= 0; i < len; i++) {
char ch= args.charAt(i);
......@@ -1391,7 +1370,7 @@ public class DebugPlugin extends Plugin {
private static String[] parseArgumentsImpl(String args, boolean split) {
// man sh, see topic QUOTING
List<String> result = new ArrayList<String>();
List<String> result = new ArrayList<>();
final int DEFAULT= 0;
final int ARG= 1;
......@@ -1399,7 +1378,7 @@ public class DebugPlugin extends Plugin {
final int IN_SINGLE_QUOTE= 3;
int state= DEFAULT;
StringBuffer buf= new StringBuffer();
StringBuilder buf= new StringBuilder();
int len= args.length();
for (int i= 0; i < len; i++) {
char ch= args.charAt(i);
......@@ -1553,7 +1532,7 @@ public class DebugPlugin extends Plugin {
*/
public static String renderArguments(String[] arguments, int[] segments) {
boolean isWin32= Platform.getOS().equals(Constants.OS_WIN32);
StringBuffer buf = new StringBuffer();
StringBuilder buf = new StringBuilder();
int count = arguments.length;
for (int i = 0; i < count; i++) {
if (i > 0) {
......
/*******************************************************************************
* Copyright (c) 2000, 2013 IBM Corporation and others.
* Copyright (c) 2000, 2017 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
......@@ -7,10 +7,12 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
* Axel Richard (Obeo) - Bug 41353 - Launch configurations prototypes
*******************************************************************************/
package org.eclipse.debug.core;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Set;
......@@ -68,6 +70,14 @@ public interface ILaunchConfiguration extends IAdaptable {
*/
public static final String LAUNCH_CONFIGURATION_FILE_EXTENSION = "launch"; //$NON-NLS-1$
/**
* The file extension for launch configuration prototype files (value
* <code>"prototype"</code>).
*
* @since 3.12
*/
public static final String LAUNCH_CONFIGURATION_PROTOTYPE_FILE_EXTENSION = "prototype"; //$NON-NLS-1$
/**
* Launch configuration attribute storing an identifier of
* a persistable source locator extension. When this attribute is
......@@ -90,6 +100,38 @@ public interface ILaunchConfiguration extends IAdaptable {
*/
public static final String ATTR_SOURCE_LOCATOR_MEMENTO = DebugPlugin.getUniqueIdentifier() + ".source_locator_memento"; //$NON-NLS-1$
/**
* Flag indicating that only this configuration is to be modified by an operation.
* Any prototype children referring to this configuration will not be modified.
*
* @since 3.12
*/
public static final int UPDATE_NONE = 0;
/**
* Flag indicating that this prototype and any effected prototype children of this prototype
* should be updated when this prototype is modified.
*
* @since 3.12
*/
public static final int UPDATE_PROTOTYPE_CHILDREN = 1;
/**
* Type constant (bit mask value 1) which identifies a launch configuration.
*
* @see #getKind()
* @since 3.12
*/
public static final int CONFIGURATION = 0x1;
/**
* Type constant (bit mask value 2) which identifies a launch configuration prototype.
*
* @see #getKind()
* @since 3.12
*/
public static final int PROTOTYPE = 0x2;
/**
* Returns whether the contents of this launch configuration are
* equal to the contents of the given launch configuration.
......@@ -122,17 +164,38 @@ public interface ILaunchConfiguration extends IAdaptable {
/**
* Deletes this launch configuration. This configuration's underlying
* storage is deleted. Has no effect if this configuration
* does not exist.
* storage is deleted. Has no effect if this configuration does not exist.
* <p>
* Equivalent to #delete(UPDATE_NONE)
* </p>
*
* @exception CoreException if this method fails. Reasons include:
* <ul>
* <li>An exception occurs while deleting this configuration's
* underlying storage.</li>
* <li>An exception occurs while deleting this
* configuration's underlying storage.</li>
* </ul>
*/
public void delete() throws CoreException;
/**
* Deletes this launch configuration. This configuration's underlying
* storage is deleted. Has no effect if this configuration does not exist.
* <p>
* When UPDATE_PROTOTYPE_CHILDREN is specified, back pointers to this
* prototype are cleared in any prototype children.
* </p>
*
* @param flag one of UPDATE_NONE or UPDATE_PROTOTYPE_CHILDREN
* @exception CoreException if this method fails. Reasons include:
* <ul>
* <li>An exception occurs while deleting this
* configuration's underlying storage or updating any
* prototype children.</li>
* </ul>
* @since 3.12
*/
public void delete(int flag) throws CoreException;
/**
* Returns whether this launch configuration's underlying
* storage exists. This is a handle-only method.
......@@ -597,4 +660,79 @@ public interface ILaunchConfiguration extends IAdaptable {
* @since 3.3
*/
public boolean isReadOnly();
/**
* Returns the prototype this launch configuration was created from or
* <code>null</code> if none.
*
* @return the prototype this launch configuration was created from or
* <code>null</code> if none
* @throws CoreException if the prototype could not be retrieved or no
* longer exists
* @since 3.12
*/
public ILaunchConfiguration getPrototype() throws CoreException;
/**
* Check if the given attribute has the same value than the one from its prototype.
* @param attribute the attribute to check
* @return <code>true</code> if the attribute is modified, <code>false</code> otherwise.
* @throws CoreException if an exception occurs while checking
* @since 3.12
*/
public boolean isAttributeModified(String attribute) throws CoreException;
/**
* Returns whether this configuration is a prototype.
*
* @return whether this configuration is a prototype
* @since 3.12
*/
public boolean isPrototype();
/**
* Returns all configurations made from this prototype, possibly an empty
* collection.
*
* @return all configurations made from this prototype
* @throws CoreException if unable to retrieve this prototype's children
* @since 3.12
*/
public Collection<ILaunchConfiguration> getPrototypeChildren() throws CoreException;
/**
* Returns this configuration's kind. One of CONFIGURATION or PROTOTYPE.
*
* @see #CONFIGURATION
* @see #PROTOTYPE
*
* @return this configuration's kind
* @throws CoreException if unable to retrieve this configuration's kind
* @since 3.12
*/
public int getKind() throws CoreException;
/**
* Get the visible attributes of this prototype (return <code>null</code> if
* the launch configuration is not a prototype).
*
* @return the visible attributes of this prototype (return
* <code>null</code> if the launch configuration is not a
* prototype).
* @throws CoreException if unable to retrieve this prototype's visible
* attribute set.
* @since 3.12
*/
public Set<String> getPrototypeVisibleAttributes() throws CoreException;
/**
* Set the visibility of the given prototype's attribute.
*
* @param attribute the attribute to set
* @param visible the visibility
* @throws CoreException if unable to set this prototype's attribute
* visibility
* @since 3.12
*/
public void setPrototypeAttributeVisibility(String attribute, boolean visible) throws CoreException;
}