use of org.eclipse.wst.xsd.ui.internal.adt.edit.ComponentReferenceEditManager in project webtools.sourceediting by eclipse.
the class ElementReferenceDirectEditManager method getComponentReferenceEditManager.
protected ComponentReferenceEditManager getComponentReferenceEditManager() {
ComponentReferenceEditManager result = null;
IEditorPart editor = getActiveEditor();
if (editor != null) {
result = (ComponentReferenceEditManager) editor.getAdapter(XSDElementReferenceEditManager.class);
}
return result;
}
use of org.eclipse.wst.xsd.ui.internal.adt.edit.ComponentReferenceEditManager in project webtools.sourceediting by eclipse.
the class AttributeReferenceDirectEditManager method getComponentReferenceEditManager.
protected ComponentReferenceEditManager getComponentReferenceEditManager() {
ComponentReferenceEditManager result = null;
IEditorPart editor = getActiveEditor();
if (editor != null) {
result = (ComponentReferenceEditManager) editor.getAdapter(XSDAttributeReferenceEditManager.class);
}
return result;
}
use of org.eclipse.wst.xsd.ui.internal.adt.edit.ComponentReferenceEditManager in project webtools.sourceediting by eclipse.
the class ReferenceDirectEditManager method getComponentSpecificationForValue.
protected ComponentSpecification getComponentSpecificationForValue(String value) {
ComponentReferenceEditManager editManager = getComponentReferenceEditManager();
if (editManager != null) {
ComponentSpecification[] quickPicks = editManager.getQuickPicks();
if (quickPicks != null) {
for (int i = 0; i < quickPicks.length; i++) {
ComponentSpecification componentSpecification = quickPicks[i];
if (value.equals(componentSpecification.getName())) {
return componentSpecification;
}
}
}
ComponentSpecification[] history = editManager.getHistory();
if (history != null) {
for (int i = 0; i < history.length; i++) {
ComponentSpecification componentSpecification = history[i];
if (value.equals(componentSpecification.getName())) {
return componentSpecification;
}
}
}
}
return null;
}
use of org.eclipse.wst.xsd.ui.internal.adt.edit.ComponentReferenceEditManager in project webtools.sourceediting by eclipse.
the class ReferenceDirectEditManager method computeComboContent.
protected List computeComboContent() {
List list = new ArrayList();
ComponentReferenceEditManager editManager = getComponentReferenceEditManager();
if (editManager != null) {
list.add(Messages._UI_COMBO_BROWSE);
list.add(Messages._UI_COMBO_NEW);
ComponentSpecification[] quickPicks = editManager.getQuickPicks();
if (quickPicks != null) {
for (int i = 0; i < quickPicks.length; i++) {
ComponentSpecification componentSpecification = quickPicks[i];
list.add(componentSpecification.getName());
}
}
ComponentSpecification[] history = editManager.getHistory();
if (history != null) {
for (int i = 0; i < history.length; i++) {
ComponentSpecification componentSpecification = history[i];
list.add(componentSpecification.getName());
}
}
}
return list;
}
use of org.eclipse.wst.xsd.ui.internal.adt.edit.ComponentReferenceEditManager in project webtools.sourceediting by eclipse.
the class TypeReferenceDirectEditManager method getComponentReferenceEditManager.
protected ComponentReferenceEditManager getComponentReferenceEditManager() {
ComponentReferenceEditManager result = null;
IEditorPart editor = getActiveEditor();
if (editor != null) {
result = (ComponentReferenceEditManager) editor.getAdapter(XSDTypeReferenceEditManager.class);
if (result instanceof ComponentReferenceEditManager2) {
ComponentReferenceEditManager2 manager = (ComponentReferenceEditManager2) result;
manager.setReferencer(setObject);
}
}
return result;
}
Aggregations