当前位置: 首页>>代码示例>>Java>>正文


Java IServer.delete方法代码示例

本文整理汇总了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();
	}
}
 
开发者ID:eclipse,项目名称:cft,代码行数:23,代码来源:ServerHandler.java

示例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;
}
 
开发者ID:eclipse,项目名称:cft,代码行数:27,代码来源:ServerHandler.java

示例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();
}
 
开发者ID:eclipse,项目名称:cft,代码行数:26,代码来源:ManageCloudDialog.java

示例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 */
    }
  }
}
 
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-eclipse,代码行数:12,代码来源:ServerTracker.java

示例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();
		}
	}
}
 
开发者ID:fbricon,项目名称:wildfly-hive,代码行数:11,代码来源:WildlfySwarmDetectionJob.java


注:本文中的org.eclipse.wst.server.core.IServer.delete方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。