本文整理汇总了Java中org.eclipse.wst.server.core.internal.IModulePublishHelper类的典型用法代码示例。如果您正苦于以下问题:Java IModulePublishHelper类的具体用法?Java IModulePublishHelper怎么用?Java IModulePublishHelper使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
IModulePublishHelper类属于org.eclipse.wst.server.core.internal包,在下文中一共展示了IModulePublishHelper类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getLauncherDirectory
import org.eclipse.wst.server.core.internal.IModulePublishHelper; //导入依赖的package包/类
/**
* Return the launcher directory path.
*
* The -launcherDir war/output/path is the war deployment directory
*
* @param server
* @param launchConfig
* @param gwtFacetedProject
* @return the launcher directory or war output path
*/
private String getLauncherDirectory(IServer server, ILaunchConfiguration launchConfig,
IFacetedProject gwtFacetedProject) {
String launcherDir = null;
// The root module will be the server module
// The root module may have children such as, client, shared
// The root module may not have any children
for (IModule[] module : getAllModules(server)) {
if (module[module.length - 1].getProject() == gwtFacetedProject.getProject()) {
// Child modules are overlaid or included in the root module
IPath path = null;
if (server instanceof IModulePublishHelper) {
path = ((IModulePublishHelper) server).getPublishDirectory(new IModule[] { module[0] });
} else {
IModulePublishHelper helper = server.getAdapter(IModulePublishHelper.class);
if (helper != null) {
path = helper.getPublishDirectory(new IModule[] { module[0] });
}
}
// example:
// /Users/branflake2267/Documents/runtime-EclipseApplication/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/broyer-sandbox-server
launcherDir = path == null ? null : path.toOSString();
if (launcherDir != null) {
return launcherDir;
}
}
}
// Get the the war output path from classic launch configuration working directory
// Also used GaeServerBehaviour.setupLaunchConfig(...)
try {
launcherDir = launchConfig.getAttribute(IJavaLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY, (String) null);
} catch (CoreException e) {
logMessage(
"posiblyLaunchGwtSuperDevModeCodeServer: Couldn't get working directory from launchConfig IJavaLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY.");
}
return launcherDir;
}