Examples of loadAdapter()


Examples of org.eclipse.wst.server.core.IRuntimeWorkingCopy.loadAdapter()

    private GeronimoRuntimeDelegate getRuntimeDelegate() {
        IRuntimeWorkingCopy wc = (IRuntimeWorkingCopy) getTaskModel().getObject(TaskModel.TASK_RUNTIME);
        if (wc == null)
            return null;
        return (GeronimoRuntimeDelegate) wc.loadAdapter(GeronimoRuntimeDelegate.class, new NullProgressMonitor());
    }

    private String createName() {
        RuntimeDelegate dl = getRuntimeDelegate();
        IRuntimeType runtimeType = dl.getRuntime().getRuntimeType();
View Full Code Here

Examples of org.eclipse.wst.server.core.IRuntimeWorkingCopy.loadAdapter()

  protected void populateModel() {
    IRuntimeWorkingCopy workingCopy = getRuntimeWorkingCopy();
    if (workingCopy != null) {
      // workCopy will be instance of ServerDelegate classs.
      // We need to get the params, so IFuseESBRuntime will be enough.
      IKarafRuntime karafRuntime = (IKarafRuntime) workingCopy
          .loadAdapter(IKarafRuntime.class, new NullProgressMonitor());
      if (karafRuntime != null) {
        IPath loc = karafRuntime.getLocation();
        model.setKarafInstallDir(loc == null ? null : loc.toOSString());
      }
View Full Code Here

Examples of org.eclipse.wst.server.core.IRuntimeWorkingCopy.loadAdapter()

  private void updateRuntime() {
    IRuntimeWorkingCopy workingCopy = getRuntimeWorkingCopy();
    if (workingCopy != null) {
      // workCopy will be instance of ServerDelegate classs.
      // We need to get the params, so IKarafRuntime will be enough.
      IKarafRuntimeWorkingCopy karafRuntimeWorkingCopy = (IKarafRuntimeWorkingCopy) workingCopy
          .loadAdapter(IKarafRuntimeWorkingCopy.class,
              new NullProgressMonitor());
      if (karafRuntimeWorkingCopy != null) {
        String installDir = model.getKarafInstallDir();
        IPath path = new Path(installDir);
View Full Code Here

Examples of org.eclipse.wst.server.core.IServer.loadAdapter()

  }

  private void openApplicationPage(ModuleServer moduleServer) {
    final IModule[] modules = moduleServer.getModule();
    IServer server = moduleServer.getServer();
    CloudFoundryServer cloudServer = (CloudFoundryServer) server.loadAdapter(CloudFoundryServer.class, null);
    if (cloudServer != null && modules != null && modules.length == 1) {
      IWorkbenchWindow workbenchWindow = ServerUIPlugin.getInstance().getWorkbench().getActiveWorkbenchWindow();
      IWorkbenchPage page = workbenchWindow.getActivePage();

      try {
View Full Code Here

Examples of org.eclipse.wst.server.core.IServer.loadAdapter()

    // Handle the TreeSelection
    if (receiver instanceof StructuredSelection) {
      Object obj = ((StructuredSelection)receiver).getFirstElement();
      if (obj instanceof IServer) {
         server = (IServer) obj;
         cloudFoundryServer = (CloudFoundryServer) server.loadAdapter(CloudFoundryServer.class, null);
      } else if (obj instanceof IServerModule) {
         serverModule = (IServerModule)obj;
         cloudFoundryServer = getCloudFoundryServer(serverModule);
      }
    } // Handle the List
View Full Code Here

Examples of org.eclipse.wst.server.core.IServer.loadAdapter()

      List<?> arr = (List<?>) receiver;
      if (!arr.isEmpty()) {
        Object obj = arr.get(0);
        if (obj instanceof IServer) {
         server = (IServer) obj;
         cloudFoundryServer = (CloudFoundryServer) server.loadAdapter(CloudFoundryServer.class, null);
        }
      }
    } else // This is the default behaviour, as before
        serverModule = getServerModule(receiver);
      if (serverModule != null) {
View Full Code Here

Examples of org.eclipse.wst.server.core.IServer.loadAdapter()

  protected CloudFoundryServer getCloudFoundryServer(IServerModule serverModule) {

    if (serverModule != null) {
      IServer server = serverModule.getServer();

      return (CloudFoundryServer) server.loadAdapter(CloudFoundryServer.class, null);
    }
    return null;
  }

  protected IServerModule getServerModule(Object context) {
View Full Code Here

Examples of org.eclipse.wst.server.core.IServer.loadAdapter()

        if (server == null) {
            throw new CoreException(new Status(IStatus.ERROR, Activator.PLUGIN_ID, "No server found for configuration "
                    + configuration));
        }

        SlingLaunchpadBehaviour launchpad = (SlingLaunchpadBehaviour) server.loadAdapter(SlingLaunchpadBehaviour.class,
                monitor);

        launchpad.setupLaunch(launch, mode, monitor);
        launchpad.start(monitor);
    }
View Full Code Here

Examples of org.eclipse.wst.server.core.IServer.loadAdapter()

    List<AccountResource> list = new ArrayList<AccountResource>();
    IServer[] allServers = ServerCore.getServers();
    for (int i = 0; i < allServers.length; i++) {
      IServer candidate = allServers[i];
      if (CloudFoundryRsePlugin.doesServerBelongToHost(candidate, host)) {
        CloudFoundryServer server = (CloudFoundryServer) candidate.loadAdapter(CloudFoundryServer.class,
            monitor);
        AccountResource resource = new AccountResource(server);
        list.add(resource);
      }
    }
View Full Code Here

Examples of org.eclipse.wst.server.core.IServer.loadAdapter()

    IServer server = ServerUtil.getServer(configuration);
    if (server == null) {
      abort("Missing server", null,
          IJavaLaunchConfigurationConstants.ERR_INTERNAL_ERROR);
    }
    OpenEJBServerBehaviour genericServer = (OpenEJBServerBehaviour) server.loadAdapter(ServerBehaviourDelegate.class, null);

    try {
//      genericServer.setupLaunch(launch, mode, monitor);
      if(genericServer.getServer().getServerType().supportsRemoteHosts() && !SocketUtil.isLocalhost(genericServer.getServer().getHost())){
      // no launch for remote servers
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.