當前位置: 首頁>>代碼示例>>Java>>正文


Java ItemPresentation類代碼示例

本文整理匯總了Java中com.intellij.navigation.ItemPresentation的典型用法代碼示例。如果您正苦於以下問題:Java ItemPresentation類的具體用法?Java ItemPresentation怎麽用?Java ItemPresentation使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


ItemPresentation類屬於com.intellij.navigation包,在下文中一共展示了ItemPresentation類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getPresentation

import com.intellij.navigation.ItemPresentation; //導入依賴的package包/類
public static ItemPresentation getPresentation(final TSFnDeclStmt function) {
    return new ItemPresentation() {
        @Nullable
        @Override
        public String getPresentableText() {
            if (function.getFunctionType() == TSFunctionType.GLOBAL) {
                return function.getFunctionName();
            } else {
                return function.getNamespace() + "::" + function.getFunctionName();
            }
        }

        @Nullable
        @Override
        public String getLocationString() {
            return function.getContainingFile().getName();
        }

        @Nullable
        @Override
        public Icon getIcon(boolean unused) {
            return TSIcons.FILE;
        }
    };
}
 
開發者ID:CouleeApps,項目名稱:TS-IJ,代碼行數:26,代碼來源:TSPsiImplUtil.java

示例2: getPresentation

import com.intellij.navigation.ItemPresentation; //導入依賴的package包/類
@Override
public ItemPresentation getPresentation() {
    return new ItemPresentation() {
        @Override
        public String getPresentableText() {
            return getName();
        }

        @Nullable
        @Override
        public String getLocationString() {
            return null;
        }

        @Override
        public Icon getIcon(boolean unused) {
            return Icons.TYPE;
        }
    };
}
 
開發者ID:reasonml-editor,項目名稱:reasonml-idea-plugin,代碼行數:21,代碼來源:PsiTypeImpl.java

示例3: getPresentation

import com.intellij.navigation.ItemPresentation; //導入依賴的package包/類
@Override
public ItemPresentation getPresentation() {
    return new ItemPresentation() {
        @Nullable
        @Override
        public String getPresentableText() {
            return getName();
        }

        @Nullable
        @Override
        public String getLocationString() {
            return null;
        }

        @Override
        public Icon getIcon(boolean unused) {
            return Icons.INCLUDE;
        }
    };
}
 
開發者ID:reasonml-editor,項目名稱:reasonml-idea-plugin,代碼行數:22,代碼來源:PsiIncludeImpl.java

示例4: getPresentation

import com.intellij.navigation.ItemPresentation; //導入依賴的package包/類
@Override
public ItemPresentation getPresentation() {
    return new ItemPresentation() {
        @Nullable
        @Override
        public String getPresentableText() {
            return getName();
        }

        @Nullable
        @Override
        public String getLocationString() {
            return null;
        }

        @Nullable
        @Override
        public Icon getIcon(boolean unused) {
            return Icons.OPEN;
        }
    };
}
 
開發者ID:reasonml-editor,項目名稱:reasonml-idea-plugin,代碼行數:23,代碼來源:PsiOpenImpl.java

示例5: getPresentation

import com.intellij.navigation.ItemPresentation; //導入依賴的package包/類
public ItemPresentation getPresentation() {
    return new ItemPresentation() {
        @Nullable
        @Override
        public String getPresentableText() {
            return getName();
        }

        @Nullable
        @Override
        public String getLocationString() {
            return null;
        }

        @Nullable
        @Override
        public Icon getIcon(boolean unused) {
            return Icons.MODULE;
        }
    };
}
 
開發者ID:reasonml-editor,項目名稱:reasonml-idea-plugin,代碼行數:22,代碼來源:PsiModuleImpl.java

示例6: getPresentation

import com.intellij.navigation.ItemPresentation; //導入依賴的package包/類
@Override
public ItemPresentation getPresentation() {
    return new ItemPresentation() {
        @Nullable
        @Override
        public String getPresentableText() {
            return getName();
        }

        @Nullable
        @Override
        public String getLocationString() {
            return null;
        }

        @Nullable
        @Override
        public Icon getIcon(boolean unused) {
            return Icons.EXCEPTION;
        }
    };
}
 
開發者ID:reasonml-editor,項目名稱:reasonml-idea-plugin,代碼行數:23,代碼來源:PsiExceptionImpl.java

示例7: getPresentation

import com.intellij.navigation.ItemPresentation; //導入依賴的package包/類
@Override
public ItemPresentation getPresentation() {
    return new ItemPresentation() {
        @Nullable
        @Override
        public String getPresentableText() {
            return getName();
        }

        @Nullable
        @Override
        public String getLocationString() {
            return null;
        }

        @Nullable
        @Override
        public Icon getIcon(boolean unused) {
            return Icons.VAL;
        }
    };
}
 
開發者ID:reasonml-editor,項目名稱:reasonml-idea-plugin,代碼行數:23,代碼來源:PsiValImpl.java

示例8: getPresentation

import com.intellij.navigation.ItemPresentation; //導入依賴的package包/類
@NotNull
@Override
public ItemPresentation getPresentation() {
    return new ItemPresentation() {
        @Nullable
        @Override
        public String getPresentableText() {
            return element.getVirtualFile().getName().toString();
        }

        @Nullable
        @Override
        public String getLocationString() {
            return element.getVirtualFile().getCanonicalPath();
        }

        @Nullable
        @Override
        public Icon getIcon(boolean b) {
            return GCMIcons.GCM_ICON_16x16;
        }
    };
}
 
開發者ID:datathings,項目名稱:greycat-idea-plugin,代碼行數:24,代碼來源:GCMStructureViewRootElement.java

示例9: getPresentation

import com.intellij.navigation.ItemPresentation; //導入依賴的package包/類
@NotNull
@Override
public ItemPresentation getPresentation() {
    return new ItemPresentation() {
        @Nullable
        @Override
        public String getPresentableText() {
            return simpleType;
        }

        @Nullable
        @Override
        public String getLocationString() {
            return null;
        }

        @Nullable
        @Override
        public Icon getIcon(boolean b) {
            return AllIcons.Actions.MoveUp;
        }
    };
}
 
開發者ID:datathings,項目名稱:greycat-idea-plugin,代碼行數:24,代碼來源:GCMStructureViewParentElement.java

示例10: getPresentation

import com.intellij.navigation.ItemPresentation; //導入依賴的package包/類
@NotNull
@Override
public ItemPresentation getPresentation() {
    return new ItemPresentation() {
        @Nullable
        @Override
        public String getPresentableText() {
            return packageName;
        }

        @Nullable
        @Override
        public String getLocationString() {
            return "";
        }

        @Nullable
        @Override
        public Icon getIcon(boolean b) {
            return PlatformIcons.PACKAGE_ICON;
        }
    };
}
 
開發者ID:datathings,項目名稱:greycat-idea-plugin,代碼行數:24,代碼來源:GCMStructureViewPackageElement.java

示例11: getPresentation

import com.intellij.navigation.ItemPresentation; //導入依賴的package包/類
@NotNull
@Override
public ItemPresentation getPresentation() {
    return new ItemPresentation() {
        @Nullable
        @Override
        public String getPresentableText() {
            return attDecl.getAttributeName().getText() + " : " + simpleType;
        }

        @Nullable
        @Override
        public String getLocationString() {
            return null;
        }

        @Nullable
        @Override
        public Icon getIcon(boolean b) {
            return myIcon;
        }
    };
}
 
開發者ID:datathings,項目名稱:greycat-idea-plugin,代碼行數:24,代碼來源:GCMStructureViewAttributeElement.java

示例12: getPresentation

import com.intellij.navigation.ItemPresentation; //導入依賴的package包/類
@NotNull
@Override
public ItemPresentation getPresentation() {
    return new ItemPresentation() {
        @Nullable
        @Override
        public String getPresentableText() {
            return presText;
        }

        @Nullable
        @Override
        public String getLocationString() {
            return null;
        }

        @Nullable
        @Override
        public Icon getIcon(boolean b) {
            return PlatformIcons.CLASS_ICON;
        }
    };
}
 
開發者ID:datathings,項目名稱:greycat-idea-plugin,代碼行數:24,代碼來源:GCMStructureViewClassElement.java

示例13: getPresentation

import com.intellij.navigation.ItemPresentation; //導入依賴的package包/類
@Override
public ItemPresentation getPresentation() {
    return new ItemPresentation() {
        @Nullable
        @Override
        public String getPresentableText() {
            return getName();
        }

        @Nullable
        @Override
        public String getLocationString() {
            return getNode().getPsi().getContainingFile().getName();
        }

        @Nullable
        @Override
        public Icon getIcon(boolean unused) {
            return GCMIcons.GCM_ICON_16x16;
        }
    };
}
 
開發者ID:datathings,項目名稱:greycat-idea-plugin,代碼行數:23,代碼來源:GCMNamedElementImpl.java

示例14: getPresentation

import com.intellij.navigation.ItemPresentation; //導入依賴的package包/類
public static ItemPresentation getPresentation(final GCMTypeDeclaration element) {
    return new ItemPresentation() {
        @Nullable
        @Override
        public String getPresentableText() {
            return element.getName();
        }

        @Nullable
        @Override
        public String getLocationString() {
            return element.getContainingFile().getName();
        }

        @Nullable
        @Override
        public Icon getIcon(boolean unused) {
            return GCMIcons.GCM_ICON_16x16;
        }
    };
}
 
開發者ID:datathings,項目名稱:greycat-idea-plugin,代碼行數:22,代碼來源:GCMUtil.java

示例15: getPresentation

import com.intellij.navigation.ItemPresentation; //導入依賴的package包/類
public static ItemPresentation getPresentation(final CptTemplate element) {
	return new ItemPresentation() {
		@Nullable
		@Override
		public String getPresentableText() {
			return element.getTemplateName();
		}

		@Nullable
		@Override
		public String getLocationString() {
			PsiFile containingFile = element.getContainingFile();
			return containingFile == null ? null : containingFile.getName();
		}

		@Nullable
		@Override
		public Icon getIcon(boolean unused) {
			return CptIcons.FILE;
		}
	};
}
 
開發者ID:xylo,項目名稱:intellij-postfix-templates,代碼行數:23,代碼來源:CptPsiImplUtil.java


注:本文中的com.intellij.navigation.ItemPresentation類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。