mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-06 17:26:01 +02:00
Bug 303083 - Make cdt.core.native plugin consistent after rename
The org.eclipse.cdt.core.native plugin has been renamed from org.eclipse.cdt.core.spawner but that has left a couple inconsistencies which are fixed with this commit: 1. Rename o.e.cdt.internal.core.spawner package -> natives package Note that renaming the package to "native" was not possible since "native" is a Java keyword, thus I chose "natives" 2. Rename CSpawnerPlugin -> CNativePlugin, update win32 fragment 3. Fix PLUGIN_ID for proper logging with IStatus 4. Fix MANIFEST.MF export-package;split declaration 5. Add "version" spec on "export-package" for pty and spawner packages 6. Rename "utils" source folder to "src" as this is standard practice 7. Remove "spawner" from the list of Javadoc plugins in cdt.core Change-Id: Ie5d1112d3f2da120dd5b1446cb6a137382226f0f Signed-off-by: Martin Oberhuber <martin.oberhuber@windriver.com> Reviewed-on: https://git.eclipse.org/r/27346 Tested-by: Hudson CI Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
This commit is contained in:
parent
451cdd5787
commit
2b9bbdec61
19 changed files with 33 additions and 33 deletions
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<classpath>
|
<classpath>
|
||||||
<classpathentry kind="src" path="utils"/>
|
<classpathentry kind="src" path="src"/>
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
|
||||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||||
<classpathentry kind="output" path="bin"/>
|
<classpathentry kind="output" path="bin"/>
|
||||||
|
|
|
@ -3,13 +3,13 @@ Bundle-ManifestVersion: 2
|
||||||
Bundle-Name: %pluginName
|
Bundle-Name: %pluginName
|
||||||
Bundle-SymbolicName: org.eclipse.cdt.core.native;singleton:=true
|
Bundle-SymbolicName: org.eclipse.cdt.core.native;singleton:=true
|
||||||
Bundle-Version: 5.7.0.qualifier
|
Bundle-Version: 5.7.0.qualifier
|
||||||
Bundle-Activator: org.eclipse.cdt.internal.core.spawner.CSpawnerPlugin
|
Bundle-Activator: org.eclipse.cdt.internal.core.natives.CNativePlugin
|
||||||
Bundle-Vendor: %providerName
|
Bundle-Vendor: %providerName
|
||||||
Bundle-Localization: plugin
|
Bundle-Localization: plugin
|
||||||
Export-Package: org.eclipse.cdt.core;org.eclipse.cdt.core.spawner=split;mandatory=org.eclipse.cdt.core.spawner,
|
Export-Package: org.eclipse.cdt.core;org.eclipse.cdt.core.native=split;mandatory=org.eclipse.cdt.core.native,
|
||||||
org.eclipse.cdt.utils;org.eclipse.cdt.core.spawner=split;mandatory=org.eclipse.cdt.core.spawner,
|
org.eclipse.cdt.utils;org.eclipse.cdt.core.native=split;mandatory=org.eclipse.cdt.core.native,
|
||||||
org.eclipse.cdt.utils.pty,
|
org.eclipse.cdt.utils.pty;version="5.7",
|
||||||
org.eclipse.cdt.utils.spawner
|
org.eclipse.cdt.utils.spawner;version="5.7"
|
||||||
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.7.0,4.0.0)"
|
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.7.0,4.0.0)"
|
||||||
Bundle-ActivationPolicy: lazy
|
Bundle-ActivationPolicy: lazy
|
||||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
|
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
|
||||||
|
|
|
@ -17,7 +17,7 @@ src.includes = about.html
|
||||||
javadoc.packages = org.eclipse.cdt.utils.*,\
|
javadoc.packages = org.eclipse.cdt.utils.*,\
|
||||||
org.eclipse.cdt.utils.pty.*,\
|
org.eclipse.cdt.utils.pty.*,\
|
||||||
org.eclipse.cdt.utils.spawner.*
|
org.eclipse.cdt.utils.spawner.*
|
||||||
source.. = utils/
|
source.. = src/
|
||||||
|
|
||||||
jre.compilation.profile=JavaSE-1.7
|
jre.compilation.profile=JavaSE-1.7
|
||||||
javacSource=1.7
|
javacSource=1.7
|
||||||
|
|
|
@ -9,35 +9,36 @@
|
||||||
* IBM Corporation - initial API and implementation
|
* IBM Corporation - initial API and implementation
|
||||||
* Martin Oberhuber (Wind River) - [303083] Split out from CCorePlugin
|
* Martin Oberhuber (Wind River) - [303083] Split out from CCorePlugin
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.internal.core.spawner;
|
package org.eclipse.cdt.internal.core.natives;
|
||||||
|
|
||||||
import org.eclipse.core.runtime.IStatus;
|
import org.eclipse.core.runtime.IStatus;
|
||||||
import org.eclipse.core.runtime.Plugin;
|
import org.eclipse.core.runtime.Plugin;
|
||||||
import org.eclipse.core.runtime.Status;
|
import org.eclipse.core.runtime.Status;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* CSpawnerPlugin is the life-cycle owner of the plug-in.
|
* CNativePlugin is the life-cycle owner of the plug-in, and also holds
|
||||||
|
* utility methods for logging.
|
||||||
*
|
*
|
||||||
* @noextend This class is not intended to be subclassed by clients.
|
* @noextend This class is not intended to be subclassed by clients.
|
||||||
* @noinstantiate This class is not intended to be instantiated by clients.
|
* @noinstantiate This class is not intended to be instantiated by clients.
|
||||||
*/
|
*/
|
||||||
public class CSpawnerPlugin extends Plugin {
|
public class CNativePlugin extends Plugin {
|
||||||
|
|
||||||
public static final String PLUGIN_ID = "org.eclipse.cdt.core.spawner"; //$NON-NLS-1$
|
public static final String PLUGIN_ID = "org.eclipse.cdt.core.native"; //$NON-NLS-1$
|
||||||
|
|
||||||
private static CSpawnerPlugin fgPlugin;
|
private static CNativePlugin fgPlugin;
|
||||||
|
|
||||||
// NON-API
|
// NON-API
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @noreference This constructor is not intended to be referenced by clients.
|
* @noreference This constructor is not intended to be referenced by clients.
|
||||||
*/
|
*/
|
||||||
public CSpawnerPlugin() {
|
public CNativePlugin() {
|
||||||
super();
|
super();
|
||||||
fgPlugin = this;
|
fgPlugin = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static CSpawnerPlugin getDefault() {
|
public static CNativePlugin getDefault() {
|
||||||
return fgPlugin;
|
return fgPlugin;
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,12 +8,12 @@
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Martin Oberhuber (Wind River) - [303083] Split out the Spawner
|
* Martin Oberhuber (Wind River) - [303083] Split out the Spawner
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.internal.core.spawner;
|
package org.eclipse.cdt.internal.core.natives;
|
||||||
|
|
||||||
import org.eclipse.osgi.util.NLS;
|
import org.eclipse.osgi.util.NLS;
|
||||||
|
|
||||||
public class Messages extends NLS {
|
public class Messages extends NLS {
|
||||||
private static final String BUNDLE_NAME = "org.eclipse.cdt.internal.core.spawner.messages"; //$NON-NLS-1$
|
private static final String BUNDLE_NAME = "org.eclipse.cdt.internal.core.natives.messages"; //$NON-NLS-1$
|
||||||
public static String Util_exception_cannotCreatePty;
|
public static String Util_exception_cannotCreatePty;
|
||||||
public static String Util_exception_cannotSetTerminalSize;
|
public static String Util_exception_cannotSetTerminalSize;
|
||||||
public static String Util_error_cannotRun;
|
public static String Util_error_cannotRun;
|
|
@ -14,8 +14,8 @@ package org.eclipse.cdt.utils.pty;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
import org.eclipse.cdt.internal.core.spawner.CSpawnerPlugin;
|
import org.eclipse.cdt.internal.core.natives.CNativePlugin;
|
||||||
import org.eclipse.cdt.internal.core.spawner.Messages;
|
import org.eclipse.cdt.internal.core.natives.Messages;
|
||||||
import org.eclipse.cdt.utils.spawner.Spawner;
|
import org.eclipse.cdt.utils.spawner.Spawner;
|
||||||
import org.eclipse.core.runtime.Platform;
|
import org.eclipse.core.runtime.Platform;
|
||||||
|
|
||||||
|
@ -212,7 +212,7 @@ public class PTY {
|
||||||
} catch (UnsatisfiedLinkError ule) {
|
} catch (UnsatisfiedLinkError ule) {
|
||||||
if (!setTerminalSizeErrorAlreadyLogged) {
|
if (!setTerminalSizeErrorAlreadyLogged) {
|
||||||
setTerminalSizeErrorAlreadyLogged = true;
|
setTerminalSizeErrorAlreadyLogged = true;
|
||||||
CSpawnerPlugin.log(Messages.Util_exception_cannotSetTerminalSize, ule);
|
CNativePlugin.log(Messages.Util_exception_cannotSetTerminalSize, ule);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -16,7 +16,6 @@ package org.eclipse.cdt.utils.pty;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
|
|
||||||
import org.eclipse.cdt.internal.core.spawner.Messages;
|
|
||||||
import org.eclipse.cdt.utils.pty.PTY.MasterFD;
|
import org.eclipse.cdt.utils.pty.PTY.MasterFD;
|
||||||
|
|
||||||
class PTYInputStream extends InputStream {
|
class PTYInputStream extends InputStream {
|
|
@ -15,8 +15,8 @@ package org.eclipse.cdt.utils.spawner;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
import org.eclipse.cdt.internal.core.spawner.CSpawnerPlugin;
|
import org.eclipse.cdt.internal.core.natives.CNativePlugin;
|
||||||
import org.eclipse.cdt.internal.core.spawner.Messages;
|
import org.eclipse.cdt.internal.core.natives.Messages;
|
||||||
import org.eclipse.cdt.utils.pty.PTY;
|
import org.eclipse.cdt.utils.pty.PTY;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -44,7 +44,7 @@ public class ProcessFactory {
|
||||||
} catch (SecurityException e) {
|
} catch (SecurityException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
} catch (UnsatisfiedLinkError e) {
|
} catch (UnsatisfiedLinkError e) {
|
||||||
CSpawnerPlugin.log(e.getMessage());
|
CNativePlugin.log(e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,8 +19,8 @@ import java.io.InputStream;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.util.StringTokenizer;
|
import java.util.StringTokenizer;
|
||||||
|
|
||||||
import org.eclipse.cdt.internal.core.spawner.CSpawnerPlugin;
|
import org.eclipse.cdt.internal.core.natives.CNativePlugin;
|
||||||
import org.eclipse.cdt.internal.core.spawner.Messages;
|
import org.eclipse.cdt.internal.core.natives.Messages;
|
||||||
import org.eclipse.cdt.utils.pty.PTY;
|
import org.eclipse.cdt.utils.pty.PTY;
|
||||||
import org.eclipse.core.runtime.Platform;
|
import org.eclipse.core.runtime.Platform;
|
||||||
import org.eclipse.osgi.util.NLS;
|
import org.eclipse.osgi.util.NLS;
|
||||||
|
@ -451,9 +451,9 @@ public class Spawner extends Process {
|
||||||
try {
|
try {
|
||||||
System.loadLibrary("spawner"); //$NON-NLS-1$
|
System.loadLibrary("spawner"); //$NON-NLS-1$
|
||||||
} catch (SecurityException e) {
|
} catch (SecurityException e) {
|
||||||
CSpawnerPlugin.log(e);
|
CNativePlugin.log(e);
|
||||||
} catch (UnsatisfiedLinkError e) {
|
} catch (UnsatisfiedLinkError e) {
|
||||||
CSpawnerPlugin.log(e);
|
CNativePlugin.log(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,7 @@ package org.eclipse.cdt.utils.spawner;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
|
|
||||||
import org.eclipse.cdt.internal.core.spawner.Messages;
|
import org.eclipse.cdt.internal.core.natives.Messages;
|
||||||
|
|
||||||
class SpawnerInputStream extends InputStream {
|
class SpawnerInputStream extends InputStream {
|
||||||
private int fd;
|
private int fd;
|
|
@ -21,7 +21,7 @@ import java.util.ArrayList;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.IProcessInfo;
|
import org.eclipse.cdt.core.IProcessInfo;
|
||||||
import org.eclipse.cdt.core.IProcessList;
|
import org.eclipse.cdt.core.IProcessList;
|
||||||
import org.eclipse.cdt.internal.core.spawner.CSpawnerPlugin;
|
import org.eclipse.cdt.internal.core.natives.CNativePlugin;
|
||||||
import org.eclipse.cdt.utils.spawner.ProcessFactory;
|
import org.eclipse.cdt.utils.spawner.ProcessFactory;
|
||||||
import org.eclipse.core.runtime.FileLocator;
|
import org.eclipse.core.runtime.FileLocator;
|
||||||
import org.eclipse.core.runtime.Path;
|
import org.eclipse.core.runtime.Path;
|
||||||
|
@ -43,7 +43,7 @@ public class ProcessList implements IProcessList {
|
||||||
Process p = null;
|
Process p = null;
|
||||||
String command = null;
|
String command = null;
|
||||||
InputStream in = null;
|
InputStream in = null;
|
||||||
Bundle bundle = Platform.getBundle(CSpawnerPlugin.PLUGIN_ID);
|
Bundle bundle = Platform.getBundle(CNativePlugin.PLUGIN_ID);
|
||||||
IProcessInfo[] procInfos = NOPROCESS;
|
IProcessInfo[] procInfos = NOPROCESS;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# Copyright (c) 2003, 2009 IBM Corporation and others.
|
# Copyright (c) 2003, 2014 IBM Corporation and others.
|
||||||
# All rights reserved. This program and the accompanying materials
|
# All rights reserved. This program and the accompanying materials
|
||||||
# are made available under the terms of the Eclipse Public License v1.0
|
# are made available under the terms of the Eclipse Public License v1.0
|
||||||
# which accompanies this distribution, and is available at
|
# which accompanies this distribution, and is available at
|
||||||
|
@ -7,6 +7,7 @@
|
||||||
#
|
#
|
||||||
# Contributors:
|
# Contributors:
|
||||||
# IBM Corporation - initial API and implementation
|
# IBM Corporation - initial API and implementation
|
||||||
|
# Martin Oberhuber (Wind River) - [303083] Split out the Spawner
|
||||||
###############################################################################
|
###############################################################################
|
||||||
bin.includes = plugin.xml,\
|
bin.includes = plugin.xml,\
|
||||||
plugin.properties,\
|
plugin.properties,\
|
||||||
|
@ -22,8 +23,7 @@ javadoc.packages = org.eclipse.cdt.core.*,\
|
||||||
org.eclipse.cdt.core.resources.*,\
|
org.eclipse.cdt.core.resources.*,\
|
||||||
org.eclipse.cdt.core.templateengine.*,\
|
org.eclipse.cdt.core.templateengine.*,\
|
||||||
org.eclipse.cdt.utils.*,\
|
org.eclipse.cdt.utils.*,\
|
||||||
org.eclipse.cdt.utils.elf.*,\
|
org.eclipse.cdt.utils.elf.*
|
||||||
org.eclipse.cdt.utils.spawner.*
|
|
||||||
source.. = src/,\
|
source.. = src/,\
|
||||||
model/,\
|
model/,\
|
||||||
parser/,\
|
parser/,\
|
||||||
|
|
Loading…
Add table
Reference in a new issue