Java Code Examples for com.intellij.openapi.roots.OrderEntry#getType()
The following examples show how to use
com.intellij.openapi.roots.OrderEntry#getType() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: OrderEntrySerializationUtil.java From consulo with Apache License 2.0 | 5 votes |
@Nonnull public static Element storeOrderEntry(@Nonnull OrderEntry entry) { OrderEntryType provider = entry.getType(); Element element = new Element(ORDER_ENTRY_ELEMENT_NAME); element.setAttribute(ORDER_ENTRY_TYPE_ATTR, provider.getId()); //noinspection unchecked provider.storeOrderEntry(element, entry); return element; }
Example 2
Source File: OrderEntryAppearanceServiceImpl.java From consulo with Apache License 2.0 | 5 votes |
@Nonnull @Override @SuppressWarnings("unchecked") public CellAppearanceEx forOrderEntry(@Nonnull OrderEntry orderEntry) { OrderEntryType<?> type = orderEntry.getType(); OrderEntryTypeEditor editor = OrderEntryTypeEditor.FACTORY.getByKey(type); if(editor != null) { return editor.getCellAppearance(orderEntry); } return new SimpleTextCellAppearance(orderEntry.getPresentableName(), null, SimpleTextAttributes.REGULAR_ATTRIBUTES); }
Example 3
Source File: ProjectSettingsService.java From consulo with Apache License 2.0 | 5 votes |
@RequiredUIAccess @SuppressWarnings("unchecked") public void openLibraryOrSdkSettings(final @Nonnull OrderEntry orderEntry) { OrderEntryType type = orderEntry.getType(); OrderEntryTypeEditor editor = OrderEntryTypeEditor.FACTORY.getByKey(type); if (editor != null) { editor.navigate(orderEntry); } }
Example 4
Source File: ClasspathTableItem.java From consulo with Apache License 2.0 | 5 votes |
@Nonnull @SuppressWarnings("unchecked") public static ClasspathTableItem<?> createItem(OrderEntry orderEntry, StructureConfigurableContext context) { OrderEntryType<?> type = orderEntry.getType(); OrderEntryTypeEditor editor = OrderEntryTypeEditor.FACTORY.getByKey(type); if(editor != null) { return editor.createTableItem(orderEntry, context); } return new ClasspathTableItem<OrderEntry>(orderEntry); }
Example 5
Source File: UnknownOrderEntryImpl.java From consulo with Apache License 2.0 | 4 votes |
@Override public boolean isEquivalentTo(@Nonnull OrderEntry other) { return getType() == other.getType(); }