本文整理汇总了Java中org.eclipse.wst.server.core.util.WebResource类的典型用法代码示例。如果您正苦于以下问题:Java WebResource类的具体用法?Java WebResource怎么用?Java WebResource使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
WebResource类属于org.eclipse.wst.server.core.util包,在下文中一共展示了WebResource类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getModuleArtifact
import org.eclipse.wst.server.core.util.WebResource; //导入依赖的package包/类
public IModuleArtifact getModuleArtifact(Object obj) {
IProject project = (IProject) ((IAdaptable) obj).getAdapter(IProject.class);
if (!StandAloneModuleFactory.canHandle(project)) {
return null;
}
// Bypass WTP to load registered module factories as to possibly avoid
// invoking the module factory on other components that support Java
// type modules. See org.eclipse.wst.server.core.ServerUtil on how
// to get modules through the WTP framework.
IModule[] modules = ServerUtil.getModules(project);
if (modules == null || modules.length == 0) {
return null;
}
return new WebResource(modules[0], Path.EMPTY);
}
示例2: getLaunchable
import org.eclipse.wst.server.core.util.WebResource; //导入依赖的package包/类
@Override
public Object getLaunchable(IServer server, IModuleArtifact moduleArtifact) throws CoreException {
if (server.getAdapter(CloudFoundryServer.class) == null) {
return null;
}
if (!(moduleArtifact instanceof Servlet) && !(moduleArtifact instanceof WebResource)) {
return null;
}
if (moduleArtifact.getModule().loadAdapter(IWebModule.class, null) == null) {
return null;
}
return new CloudFoundryLaunchable(server, moduleArtifact);
}
示例3: getLaunchable
import org.eclipse.wst.server.core.util.WebResource; //导入依赖的package包/类
@Override
public Object getLaunchable(IServer server, IModuleArtifact moduleArtifact) throws CoreException {
if (server.getAdapter(DockerFoundryServer.class) == null) {
return null;
}
if (!(moduleArtifact instanceof Servlet) && !(moduleArtifact instanceof WebResource)) {
return null;
}
if (moduleArtifact.getModule().loadAdapter(IWebModule.class, null) == null) {
return null;
}
return new DockerFoundryLaunchable(server, moduleArtifact);
}