use of org.osmorc.frameworkintegration.FrameworkInstanceDefinition in project intellij-plugins by JetBrains.
the class FrameworkDefinitionsEditorComponent method resetTo.
public void resetTo(@NotNull ApplicationSettings settings) {
myModel.clear();
for (FrameworkInstanceDefinition instance : settings.getActiveFrameworkInstanceDefinitions()) {
myModel.addElement(instance);
}
myModified.clear();
}
use of org.osmorc.frameworkintegration.FrameworkInstanceDefinition in project intellij-plugins by JetBrains.
the class OsgiRunConfiguration method getInstanceToUse.
@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;
}
use of org.osmorc.frameworkintegration.FrameworkInstanceDefinition in project intellij-plugins by JetBrains.
the class ApplicationSettings method getActiveFrameworkInstanceDefinitions.
@NotNull
public List<FrameworkInstanceDefinition> getActiveFrameworkInstanceDefinitions() {
if (myActiveInstances == null) {
final FrameworkIntegratorRegistry registry = FrameworkIntegratorRegistry.getInstance();
myActiveInstances = ContainerUtil.filter(myInstances, definition -> registry.findIntegratorByInstanceDefinition(definition) != null);
}
return myActiveInstances;
}
use of org.osmorc.frameworkintegration.FrameworkInstanceDefinition in project intellij-plugins by JetBrains.
the class FrameworkDefinitionsEditorComponent method removeFrameworkInstance.
private void removeFrameworkInstance() {
int index = myFrameworkInstances.getSelectedIndex();
if (index != -1) {
FrameworkInstanceDefinition instance = myModel.get(index);
myModel.remove(index);
myFrameworkInstances.setSelectedIndex(0);
myModified.add(Pair.create(instance, null));
}
}
use of org.osmorc.frameworkintegration.FrameworkInstanceDefinition in project intellij-plugins by JetBrains.
the class ProjectSettingsEditorComponent method applyTo.
public void applyTo(ProjectSettings settings) {
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);
settings.setBndAutoImport(myBndAutoImport.isSelected());
myModified = false;
}
Aggregations