Skip to content

Commit

Permalink
Version 0.3.2 + metadata/dict icon updates
Browse files Browse the repository at this point in the history
  • Loading branch information
justint committed Jul 14, 2020
1 parent 1cd87ef commit b5e22d8
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Expand Up @@ -3,7 +3,7 @@ plugins {
}

group 'com.justint'
version '0.3.1'
version '0.3.2'

sourceSets.main.java.srcDirs = ['src/main/gen','src/main/java']

Expand Down
Expand Up @@ -4,6 +4,7 @@
import com.intellij.lang.ASTNode;
import com.intellij.navigation.ItemPresentation;
import com.intellij.psi.tree.IElementType;
import com.intellij.ui.IconManager;
import com.intellij.util.PlatformIcons;
import com.justint.usdidea.lang.psi.*;
import org.jetbrains.annotations.NotNull;
Expand Down Expand Up @@ -117,16 +118,24 @@ public String getLocationString() {
@Override
public Icon getIcon(boolean b) {
if (dictItemElement.isDictionary()) {
return AllIcons.Json.Object;
return IconManager.getInstance().createLayered(AllIcons.Json.Object, AllIcons.Nodes.StaticMark);
}
return PlatformIcons.PROPERTY_ICON;
return IconManager.getInstance().createLayered(PlatformIcons.PROPERTY_ICON, AllIcons.Nodes.StaticMark);
}
};
}

@NotNull
public static ItemPresentation getPresentation(final usdMetadatum metadatumElement) {
return new ItemPresentation() {

// This works, but isn't neccessary - I think we can stick with layered/row icons for now
// public TextAttributesKey getTextAttributesKey() {
// TextAttributes attributes = DefaultLanguageHighlighterColors.IDENTIFIER.getDefaultAttributes().clone();
// attributes.setFontType(Font.ITALIC);
// return TextAttributesKey.createTextAttributesKey("USD_METADATA_KEY", attributes);
// }

@Nullable
@Override
public String getPresentableText() {
Expand All @@ -148,8 +157,8 @@ public String getLocationString() {
@Override
public Icon getIcon(boolean b) {
if (metadatumElement.isDictionary()) {
return AllIcons.Json.Object;
} else return PlatformIcons.METHOD_ICON;
return IconManager.getInstance().createLayered(AllIcons.Json.Object, AllIcons.Nodes.StaticMark);
} else return IconManager.getInstance().createLayered(PlatformIcons.METHOD_ICON, AllIcons.Nodes.StaticMark);
}
};
}
Expand Down
27 changes: 9 additions & 18 deletions src/main/resources/META-INF/change-notes.html
@@ -1,25 +1,16 @@
<!DOCTYPE html>
<html lang="en">
<body>
<strong>Version 0.3.1:</strong>
<strong>Version 0.3.2:</strong>
<ul>
<li>Fixed bug with Structure View where untyped properties were triggering an assertion error.</li>
<li>Fixed #4: Some namespaced attribute names break the parser</li>
</ul>
<strong>Version 0.3:</strong>
<ul>
<li>Added initial support for <b>structure view</b>!<br>
This allows you to view the outline/structure of USD files and navigate quickly to objects using the
Structure tool view.<br>
The current list of supported objects in Structure view are:
<ul>
<li>Prims</li>
<li>Attribute properties</li>
<li>(Some) relationship properties</li>
</ul>
The objects' name & type (if available) will be displayed in the Structure.
</li>
<li>New build for newer 2020.* version of IDEA IDEs</li>
<li>Added breadcrumbs feature: see where your text cursor is in the prim hierarchy at the bottom of your editor window.</li>
<li>Fixed #10: Added recovery functions to core language structures. This makes the plugin a lot more stable for malformed USD files or grammar issues.</li>
<li>Fixed #11: Allow dictionaries to have string names.</li>
<li>Added support for the following objects in Structure View:</li>
<ul>
<li>Metadata</li>
<li>Dictionaries</li>
</ul>
</ul>
</body>
</html>

0 comments on commit b5e22d8

Please sign in to comment.