Package org.osmorc.frameworkintegration

Examples of org.osmorc.frameworkintegration.FrameworkInstanceDefinition


   * Called when the framework is changed. This will create a new editor for framework properties and will also remove
   * any framework bundles from the list, as they are no longer in classpath.
   */
  private void onFrameworkChange() {
    if (myFrameworkInstances.getSelectedItem() != null) {
      FrameworkInstanceDefinition instance = (FrameworkInstanceDefinition)myFrameworkInstances.getSelectedItem();
      FrameworkIntegrator integrator = FrameworkIntegratorRegistry.getInstance().findIntegratorByInstanceDefinition(instance);
      assert integrator != null : instance;

      // clear the panel
      myAdditionalPropertiesPanel.removeAll();
View Full Code Here


  private RunConfigurationTableModel getTableModel() {
    return (RunConfigurationTableModel)myBundlesTable.getModel();
  }

  private void onAddClick() {
    FrameworkInstanceDefinition instance = (FrameworkInstanceDefinition)myFrameworkInstances.getSelectedItem();
    BundleSelector selector = new BundleSelector(myProject, instance, getBundlesToRun());
    selector.show();
    if (selector.isOK()) {
      RunConfigurationTableModel model = getTableModel();
      for (SelectedBundle aModule : selector.getSelectedBundles()) {
View Full Code Here

    String fileLocation = (String)myDefaultManifestFileLocation.getSelectedItem();
    if (fileLocation != null) {
      settings.setDefaultManifestFileLocation(fileLocation);
    }

    FrameworkInstanceDefinition instance = (FrameworkInstanceDefinition)myFrameworkInstance.getSelectedItem();
    settings.setFrameworkInstanceName(instance != null ? instance.getName() : null);

    String outputPath = myBundleOutputPath.getText();
    settings.setBundlesOutputPath(!StringUtil.isEmptyOrSpaces(outputPath) ? outputPath : null);

    myModified = false;
View Full Code Here

    myFrameworkInstance.addItem(null);

    List<FrameworkInstanceDefinition> instanceDefinitions = ApplicationSettings.getInstance().getActiveFrameworkInstanceDefinitions();
    final String frameworkInstanceName = mySettings.getFrameworkInstanceName();

    FrameworkInstanceDefinition projectFrameworkInstance = null;
    for (FrameworkInstanceDefinition instanceDefinition : instanceDefinitions) {
      //noinspection unchecked
      myFrameworkInstance.addItem(instanceDefinition);
      if (instanceDefinition.getName().equals(frameworkInstanceName)) {
        projectFrameworkInstance = instanceDefinition;
      }
    }

    // add it, but it will be marked red.
    if (projectFrameworkInstance == null && frameworkInstanceName != null) {
      projectFrameworkInstance = new FrameworkInstanceDefinition();
      projectFrameworkInstance.setName(frameworkInstanceName);
      //noinspection unchecked
      myFrameworkInstance.addItem(projectFrameworkInstance);
    }
    myFrameworkInstance.setSelectedItem(projectFrameworkInstance);
  }
View Full Code Here

  @Nullable
  public FrameworkInstanceDefinition getInstanceToUse() {
    if (instanceToUse != null) return instanceToUse;

    String projectInstanceName = ProjectSettings.getInstance(getProject()).getFrameworkInstanceName();
    FrameworkInstanceDefinition projectInstance = ApplicationSettings.getInstance().getFrameworkInstance(projectInstanceName);
    if (projectInstance != null) return projectInstance;

    return null;
  }
View Full Code Here

    myFrameworkInstances.addListSelectionListener(new ListSelectionListener() {
      public void valueChanged(ListSelectionEvent e) {
        int index = myFrameworkInstances.getSelectedIndex();
        if (index != -1) {
          FrameworkInstanceDefinition instance = (FrameworkInstanceDefinition)myModel.get(index);
          myFrameworkIntegrator.setText(instance.getFrameworkIntegratorName());
          myHomeDir.setText(instance.getBaseFolder());
          myVersion.setText(ObjectUtils.notNull(instance.getVersion(), ""));
          myFrameworkInstanceName.setText(instance.getName());
        }
      }
    });

    new DoubleClickListener() {
View Full Code Here

      }
    }.installOn(myFrameworkInstances);
  }

  private void addFrameworkInstance(FrameworkIntegrator integrator) {
    FrameworkInstanceDefinition instance = new FrameworkInstanceDefinition();
    instance.setFrameworkIntegratorName(integrator.getDisplayName());
    CreateFrameworkInstanceDialog dialog = new CreateFrameworkInstanceDialog(instance, myModel);
    dialog.pack();
    dialog.show();
    if (dialog.isOK()) {
      instance = dialog.createDefinition();
View Full Code Here

  }

  private void removeFrameworkInstance() {
    int index = myFrameworkInstances.getSelectedIndex();
    if (index != -1) {
      FrameworkInstanceDefinition instance = (FrameworkInstanceDefinition)myModel.get(index);
      myModel.remove(index);
      myFrameworkInstances.setSelectedIndex(0);
      myModified.add(Pair.create(instance, (FrameworkInstanceDefinition)null));
    }
  }
View Full Code Here

  }

  private void editFrameworkInstance() {
    int index = myFrameworkInstances.getSelectedIndex();
    if (index != -1) {
      FrameworkInstanceDefinition instance = (FrameworkInstanceDefinition)myModel.get(index);
      CreateFrameworkInstanceDialog dialog = new CreateFrameworkInstanceDialog(instance, myModel);
      dialog.pack();
      dialog.show();
      if (dialog.isOK()) {
        FrameworkInstanceDefinition newInstance = dialog.createDefinition();
        //noinspection unchecked
        myModel.set(index, newInstance);
        myModified.add(Pair.create(instance, newInstance));
      }
    }
View Full Code Here

  public OsgiRunState(@NotNull ExecutionEnvironment environment, @NotNull OsgiRunConfiguration configuration) throws ExecutionException {
    super(environment);
    myRunConfiguration = configuration;

    FrameworkInstanceDefinition instance = myRunConfiguration.getInstanceToUse();
    if (instance == null) {
      throw new CantRunException("Incorrect OSGi run configuration: framework not set");
    }
    FrameworkIntegrator integrator = FrameworkIntegratorRegistry.getInstance().findIntegratorByInstanceDefinition(instance);
    if (integrator == null) {
View Full Code Here

TOP

Related Classes of org.osmorc.frameworkintegration.FrameworkInstanceDefinition

Copyright © 2018 www.massapicom. 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.