mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-10 17:55:39 +02:00
don't use deprecated api
This commit is contained in:
parent
477fb92d41
commit
f6aaac34ed
1 changed files with 4 additions and 2 deletions
|
@ -27,6 +27,7 @@ import org.eclipse.core.runtime.Status;
|
||||||
import org.eclipse.swt.widgets.Shell;
|
import org.eclipse.swt.widgets.Shell;
|
||||||
import org.eclipse.ui.IWorkbenchWindow;
|
import org.eclipse.ui.IWorkbenchWindow;
|
||||||
import org.eclipse.ui.plugin.AbstractUIPlugin;
|
import org.eclipse.ui.plugin.AbstractUIPlugin;
|
||||||
|
import org.osgi.framework.Bundle;
|
||||||
import org.osgi.framework.BundleContext;
|
import org.osgi.framework.BundleContext;
|
||||||
|
|
||||||
public class UniversalSecurityPlugin extends AbstractUIPlugin
|
public class UniversalSecurityPlugin extends AbstractUIPlugin
|
||||||
|
@ -73,7 +74,8 @@ public class UniversalSecurityPlugin extends AbstractUIPlugin
|
||||||
|
|
||||||
public static String getKeyStoreLocation() {
|
public static String getKeyStoreLocation() {
|
||||||
|
|
||||||
return Platform.getPluginStateLocation(inst).append(KEYSTORE).toOSString();
|
Bundle bundle = Platform.getBundle(PLUGIN_ID);
|
||||||
|
return Platform.getStateLocation(bundle).append(KEYSTORE).toOSString();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getKeyStorePassword()
|
public static String getKeyStorePassword()
|
||||||
|
@ -84,7 +86,7 @@ public class UniversalSecurityPlugin extends AbstractUIPlugin
|
||||||
public static String getWorkspaceName(){
|
public static String getWorkspaceName(){
|
||||||
IPath workspace = Platform.getLocation();
|
IPath workspace = Platform.getLocation();
|
||||||
int nr = workspace.segmentCount();
|
int nr = workspace.segmentCount();
|
||||||
String workspaceName = workspaceName = workspace.segment(nr - 1);
|
String workspaceName = workspace.segment(nr - 1);
|
||||||
return workspaceName;
|
return workspaceName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue