本文整理汇总了Java中org.eclipse.wst.server.core.IServer.delete方法的典型用法代码示例。如果您正苦于以下问题:Java IServer.delete方法的具体用法?Java IServer.delete怎么用?Java IServer.delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.wst.server.core.IServer
的用法示例。
在下文中一共展示了IServer.delete方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: deleteServerAndRuntime
import org.eclipse.wst.server.core.IServer; //导入方法依赖的package包/类
public void deleteServerAndRuntime(IProgressMonitor monitor) throws CoreException {
try {
monitor.beginTask("Deleting server configuration", 4); //$NON-NLS-1$
IServer server = ServerCore.findServer(serverName);
if (server != null) {
IFolder serverConfiguration = server.getServerConfiguration();
server.delete();
if (serverConfiguration != null) {
serverConfiguration.delete(true, true, monitor);
}
}
IRuntime runtime = ServerCore.findRuntime(runtimeName);
if (runtime != null) {
runtime.delete();
}
}
finally {
monitor.done();
}
}
示例2: createServer
import org.eclipse.wst.server.core.IServer; //导入方法依赖的package包/类
private IServer createServer(IServerType st, IRuntime runtime, IProgressMonitor monitor, IOverwriteQuery query,
ServerHandlerCallback callback) throws CoreException {
IServer server = ServerCore.findServer(serverName);
if (server != null) {
if (!query(query,
NLS.bind(Messages.ServerHandler_QUERY_SERVER_EXISTS, serverName))) {
monitor.worked(1);
return server;
}
else {
IFolder serverConfiguration = server.getServerConfiguration();
server.delete();
if (serverConfiguration != null) {
serverConfiguration.delete(true, true, monitor);
}
}
}
IServerWorkingCopy wc = st.createServer(serverName, null, runtime, new SubProgressMonitor(monitor, 1));
wc.setName(serverName);
if (callback != null) {
callback.configureServer(wc);
}
server = wc.save(true, new SubProgressMonitor(monitor, 1));
return server;
}
示例3: okPressed
import org.eclipse.wst.server.core.IServer; //导入方法依赖的package包/类
@Override
protected void okPressed() {
CloudServerUIUtil.storeUserDefinedUrls(serverTypeId, cloudUrls);
// Servers to delete are servers that were previously created using a
// URL that has been deleted.
for (CloudFoundryServer server : serversToDelete) {
try {
IServer serverOriginal = server.getServerOriginal();
serverOriginal.delete();
}
catch (CoreException e) {
CloudFoundryPlugin.getDefault().getLog()
.log(new Status(IStatus.ERROR, CloudFoundryPlugin.PLUGIN_ID, "Unable to delete server", e)); //$NON-NLS-1$
}
}
// Also remove the self-signed settings for cloud URL
if (urlsToDelete != null) {
for (String url : urlsToDelete) {
CloudFoundryServer.setSelfSigned(false, url);
}
}
super.okPressed();
}
示例4: after
import org.eclipse.wst.server.core.IServer; //导入方法依赖的package包/类
@Override
protected void after() {
ServerCore.removeServerLifecycleListener(lifecycleListener);
for (IServer server : servers) {
try {
server.delete();
} catch (CoreException ex) {
/* ignore */
}
}
}
示例5: deleteServerIfNecessary
import org.eclipse.wst.server.core.IServer; //导入方法依赖的package包/类
private void deleteServerIfNecessary(IJavaProject p, IProgressMonitor monitor) {
IServer server = WildFlySwarmServerHelper.findWildflySwarmServer(p, monitor);
if (server != null) {
try {
server.delete();
} catch (CoreException e) {
e.printStackTrace();
}
}
}