本文整理汇总了Java中com.intellij.openapi.application.ex.ApplicationInfoEx类的典型用法代码示例。如果您正苦于以下问题:Java ApplicationInfoEx类的具体用法?Java ApplicationInfoEx怎么用?Java ApplicationInfoEx使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ApplicationInfoEx类属于com.intellij.openapi.application.ex包,在下文中一共展示了ApplicationInfoEx类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: showFrame
import com.intellij.openapi.application.ex.ApplicationInfoEx; //导入依赖的package包/类
public void showFrame() {
final IdeFrameImpl frame = new IdeFrameImpl(ApplicationInfoEx.getInstanceEx(),
myActionManager, myDataManager,
ApplicationManager.getApplication());
myProject2Frame.put(null, frame);
if (myFrameBounds == null || !ScreenUtil.isVisible(myFrameBounds)) { //avoid situations when IdeFrame is out of all screens
myFrameBounds = ScreenUtil.getMainScreenBounds();
int xOff = myFrameBounds.width / 8;
int yOff = myFrameBounds.height / 8;
JBInsets.removeFrom(myFrameBounds, new Insets(yOff, xOff, yOff, xOff));
}
fixForOracleBug8007219(frame);
frame.setBounds(myFrameBounds);
frame.setExtendedState(myFrameExtendedState);
frame.setVisible(true);
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:21,代码来源:WindowManagerImpl.java
示例2: updateTitle
import com.intellij.openapi.application.ex.ApplicationInfoEx; //导入依赖的package包/类
public static void updateTitle(JFrame frame, final String title, final String fileTitle, final File currentFile) {
if (myUpdatingTitle) return;
try {
myUpdatingTitle = true;
frame.getRootPane().putClientProperty("Window.documentFile", currentFile);
final String applicationName = ((ApplicationInfoEx)ApplicationInfo.getInstance()).getFullApplicationName();
final Builder builder = new Builder();
if (SystemInfo.isMac) {
boolean addAppName = StringUtil.isEmpty(title) ||
ProjectManager.getInstance().getOpenProjects().length == 0 ||
((ApplicationInfoEx)ApplicationInfo.getInstance()).isEAP() && !applicationName.endsWith("SNAPSHOT");
builder.append(fileTitle).append(title).append(addAppName ? applicationName : null);
} else {
builder.append(title).append(fileTitle).append(applicationName);
}
frame.setTitle(builder.sb.toString());
}
finally {
myUpdatingTitle = false;
}
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:26,代码来源:IdeFrameImpl.java
示例3: initFramePainters
import com.intellij.openapi.application.ex.ApplicationInfoEx; //导入依赖的package包/类
public static void initFramePainters(@NotNull PaintersHelper painters) {
PaintersHelper.initWallpaperPainter("idea.wallpaper.ide", painters);
ApplicationInfoEx appInfo = ApplicationInfoEx.getInstanceEx();
String path = UIUtil.isUnderDarcula()? appInfo.getEditorBackgroundImageUrl() : null;
URL url = path == null ? null : appInfo.getClass().getResource(path);
Image centerImage = url == null ? null : ImageLoader.loadFromUrl(url);
if (centerImage != null) {
painters.addPainter(PaintersHelper.newImagePainter(centerImage, PaintersHelper.FillType.TOP_CENTER, 1.0f, JBUI.insets(10, 0, 0, 0)), null);
}
painters.addPainter(new AbstractPainter() {
EditorEmptyTextPainter p = ServiceManager.getService(EditorEmptyTextPainter.class);
@Override
public boolean needsRepaint() {
return true;
}
@Override
public void executePaint(Component component, Graphics2D g) {
p.paintEmptyText((JComponent)component, g);
}
}, null);
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:27,代码来源:IdeBackgroundUtil.java
示例4: getUrl
import com.intellij.openapi.application.ex.ApplicationInfoEx; //导入依赖的package包/类
@NotNull
private static String getUrl(@NotNull IdeaPluginDescriptor descriptor,
@Nullable String host,
@Nullable BuildNumber buildNumber) throws URISyntaxException, MalformedURLException {
if (host != null && descriptor instanceof PluginNode) {
String url = ((PluginNode)descriptor).getDownloadUrl();
return new URI(url).isAbsolute() ? url : new URL(new URL(host), url).toExternalForm();
}
else {
Application app = ApplicationManager.getApplication();
ApplicationInfoEx appInfo = ApplicationInfoImpl.getShadowInstance();
String buildNumberAsString = buildNumber != null ? buildNumber.asString() :
app != null ? ApplicationInfo.getInstance().getApiVersion() :
appInfo.getBuild().asString();
String uuid = app != null ? UpdateChecker.getInstallationUID(PropertiesComponent.getInstance()) : UUID.randomUUID().toString();
URIBuilder uriBuilder = new URIBuilder(appInfo.getPluginsDownloadUrl());
uriBuilder.addParameter("action", "download");
uriBuilder.addParameter("id", descriptor.getPluginId().getIdString());
uriBuilder.addParameter("build", buildNumberAsString);
uriBuilder.addParameter("uuid", uuid);
return uriBuilder.build().toString();
}
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:27,代码来源:PluginDownloader.java
示例5: getAppIconImages
import com.intellij.openapi.application.ex.ApplicationInfoEx; //导入依赖的package包/类
@SuppressWarnings({"UnnecessaryFullyQualifiedName", "deprecation"})
private static List<Image> getAppIconImages() {
ApplicationInfoEx appInfo = ApplicationInfoImpl.getShadowInstance();
List<Image> images = ContainerUtil.newArrayListWithCapacity(3);
if (SystemInfo.isXWindow) {
String bigIconUrl = appInfo.getBigIconUrl();
if (bigIconUrl != null) {
images.add(com.intellij.util.ImageLoader.loadFromResource(bigIconUrl));
}
}
images.add(com.intellij.util.ImageLoader.loadFromResource(appInfo.getIconUrl()));
images.add(com.intellij.util.ImageLoader.loadFromResource(appInfo.getSmallIconUrl()));
return images;
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:AppUIUtil.java
示例6: showSplash
import com.intellij.openapi.application.ex.ApplicationInfoEx; //导入依赖的package包/类
@Nullable
private Splash showSplash(String[] args) {
if (StartupUtil.shouldShowSplash(args)) {
final ApplicationInfoEx appInfo = ApplicationInfoImpl.getShadowInstance();
final SplashScreen splashScreen = getSplashScreen();
if (splashScreen == null) {
mySplash = new Splash(appInfo);
mySplash.show();
return mySplash;
}
else {
updateSplashScreen(appInfo, splashScreen);
}
}
return null;
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:IdeaApplication.java
示例7: runStartupWizard
import com.intellij.openapi.application.ex.ApplicationInfoEx; //导入依赖的package包/类
static void runStartupWizard() {
ApplicationInfoEx appInfo = ApplicationInfoImpl.getShadowInstance();
String stepsProvider = appInfo.getCustomizeIDEWizardStepsProvider();
if (stepsProvider != null) {
CustomizeIDEWizardDialog.showCustomSteps(stepsProvider);
PluginManagerCore.invalidatePlugins();
return;
}
if (PlatformUtils.isIntelliJ()) {
new CustomizeIDEWizardDialog().show();
PluginManagerCore.invalidatePlugins();
return;
}
List<ApplicationInfoEx.PluginChooserPage> pages = appInfo.getPluginChooserPages();
if (!pages.isEmpty()) {
StartupWizard startupWizard = new StartupWizard(pages);
startupWizard.setCancelText("Skip");
startupWizard.show();
PluginManagerCore.invalidatePlugins();
}
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:25,代码来源:StartupUtil.java
示例8: getSmallApplicationIcon
import com.intellij.openapi.application.ex.ApplicationInfoEx; //导入依赖的package包/类
protected static Icon getSmallApplicationIcon() {
if (ourSmallAppIcon == null) {
try {
Icon appIcon = IconLoader.findIcon(ApplicationInfoEx.getInstanceEx().getIconUrl());
if (appIcon != null) {
if (appIcon.getIconWidth() == JBUI.scale(16) && appIcon.getIconHeight() == JBUI.scale(16)) {
ourSmallAppIcon = appIcon;
} else {
BufferedImage image = ImageUtil.toBufferedImage(IconUtil.toImage(appIcon));
image = Scalr.resize(image, Scalr.Method.ULTRA_QUALITY, UIUtil.isRetina() ? 32 : JBUI.scale(16));
ourSmallAppIcon = toRetinaAwareIcon(image);
}
}
}
catch (Exception e) {//
}
if (ourSmallAppIcon == null) {
ourSmallAppIcon = EmptyIcon.ICON_16;
}
}
return ourSmallAppIcon;
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:25,代码来源:RecentProjectsManagerBase.java
示例9: render
import com.intellij.openapi.application.ex.ApplicationInfoEx; //导入依赖的package包/类
public void render(int indentX, int indentY, List<AboutBoxLine> lines) throws OverflowException {
x = indentX;
y = indentY;
ApplicationInfoEx appInfo = (ApplicationInfoEx)ApplicationInfo.getInstance();
for (AboutBoxLine line : lines) {
final String s = line.getText();
setFont(line.isBold() ? myBoldFont : myFont);
if (line.getUrl() != null) {
g2.setColor(myLinkColor);
FontMetrics metrics = g2.getFontMetrics(font);
myLinks.add(new Link(new Rectangle(x, yBase + y - fontAscent, metrics.stringWidth(s), fontHeight), line.getUrl()));
}
else {
g2.setColor(Registry.is("ide.new.about") ? Gray.x33 : appInfo.getAboutForeground());
}
renderString(s, indentX);
if (!line.isKeepWithNext() && !line.equals(lines.get(lines.size()-1))) {
lineFeed(indentX, s);
}
}
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:22,代码来源:AboutPopup.java
示例10: updateTitle
import com.intellij.openapi.application.ex.ApplicationInfoEx; //导入依赖的package包/类
public static void updateTitle(JFrame frame, final String title, final String fileTitle, final File currentFile) {
if (myUpdatingTitle) return;
try {
myUpdatingTitle = true;
frame.getRootPane().putClientProperty("Window.documentFile", currentFile);
final String applicationName = ((ApplicationInfoEx)ApplicationInfo.getInstance()).getFullApplicationName();
final Builder builder = new Builder();
if (SystemInfo.isMac) {
builder.append(fileTitle).append(title)
.append(ProjectManager.getInstance().getOpenProjects().length == 0
|| ((ApplicationInfoEx)ApplicationInfo.getInstance()).isEAP() && !applicationName.endsWith("SNAPSHOT") ? applicationName : null);
} else {
builder.append(title).append(fileTitle).append(applicationName);
}
frame.setTitle(builder.sb.toString());
}
finally {
myUpdatingTitle = false;
}
}
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:25,代码来源:IdeFrameImpl.java
示例11: getAppIconImages
import com.intellij.openapi.application.ex.ApplicationInfoEx; //导入依赖的package包/类
@SuppressWarnings({"UnnecessaryFullyQualifiedName", "deprecation"})
private static List<Image> getAppIconImages() {
ApplicationInfoEx appInfo = ApplicationInfoImpl.getShadowInstance();
List<Image> images = ContainerUtil.newArrayListWithExpectedSize(3);
if (SystemInfo.isXWindow) {
String bigIconUrl = appInfo.getBigIconUrl();
if (bigIconUrl != null) {
images.add(com.intellij.util.ImageLoader.loadFromResource(bigIconUrl));
}
}
images.add(com.intellij.util.ImageLoader.loadFromResource(appInfo.getIconUrl()));
images.add(com.intellij.util.ImageLoader.loadFromResource(appInfo.getSmallIconUrl()));
return images;
}
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:18,代码来源:AppUIUtil.java
示例12: render
import com.intellij.openapi.application.ex.ApplicationInfoEx; //导入依赖的package包/类
public void render(int indentX, int indentY, List<AboutBoxLine> lines) throws OverflowException {
x = indentX;
y = indentY;
ApplicationInfoEx appInfo = (ApplicationInfoEx)ApplicationInfo.getInstance();
for (AboutBoxLine line : lines) {
final String s = line.getText();
setFont(line.isBold() ? myBoldFont : myFont);
if (line.getUrl() != null) {
g2.setColor(linkCol);
FontMetrics metrics = g2.getFontMetrics(font);
myLinks.add(new Link(new Rectangle(x, yBase + y - fontAscent, metrics.stringWidth(s), fontHeight), line.getUrl()));
}
else {
g2.setColor(appInfo.getAboutForeground());
}
renderString(s, indentX);
if (!line.isKeepWithNext() && !line.equals(lines.get(lines.size()-1))) {
lineFeed(indentX, s);
}
}
}
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:22,代码来源:AboutDialog.java
示例13: showFrame
import com.intellij.openapi.application.ex.ApplicationInfoEx; //导入依赖的package包/类
public void showFrame() {
final IdeFrameImpl frame = new IdeFrameImpl(ApplicationInfoEx.getInstanceEx(), myActionManager, myDataManager, ApplicationManager.getApplication());
myProject2Frame.put(null, frame);
if (myFrameBounds == null || !ScreenUtil.isVisible(myFrameBounds)) { //avoid situations when IdeFrame is out of all screens
myFrameBounds = ScreenUtil.getMainScreenBounds();
int xOff = myFrameBounds.width / 8;
int yOff = myFrameBounds.height / 8;
JBInsets.removeFrom(myFrameBounds, new Insets(yOff, xOff, yOff, xOff));
}
frame.setBounds(myFrameBounds);
frame.setExtendedState(myFrameExtendedState);
frame.setVisible(true);
}
开发者ID:consulo,项目名称:consulo,代码行数:17,代码来源:DesktopWindowManagerImpl.java
示例14: getServerHeaderValue
import com.intellij.openapi.application.ex.ApplicationInfoEx; //导入依赖的package包/类
@Nullable
public static String getServerHeaderValue() {
if (SERVER_HEADER_VALUE == null) {
Application app = ApplicationManager.getApplication();
if (app != null && !app.isDisposed()) {
SERVER_HEADER_VALUE = ApplicationInfoEx.getInstanceEx().getFullApplicationName();
}
}
return SERVER_HEADER_VALUE;
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:Responses.java
示例15: invokeHelp
import com.intellij.openapi.application.ex.ApplicationInfoEx; //导入依赖的package包/类
public void invokeHelp(@Nullable String id) {
UsageTrigger.trigger("ide.help." + id);
if (MacHelpUtil.isApplicable() && MacHelpUtil.invokeHelp(id)) {
return;
}
IdeaHelpBroker broker = myBrokerValue.getValue();
if (broker == null) {
ApplicationInfoEx info = ApplicationInfoEx.getInstanceEx();
String url = info.getWebHelpUrl() + "?";
if (PlatformUtils.isCLion()) {
url += "Keyword=" + id;
url += "&ProductVersion=" + info.getMajorVersion() + "." + info.getMinorVersion();
if (info.isEAP()) {
url += "&EAP";
}
} else {
url += id;
}
BrowserUtil.browse(url);
return;
}
Window activeWindow = KeyboardFocusManager.getCurrentKeyboardFocusManager().getActiveWindow();
broker.setActivationWindow(activeWindow);
if (id != null) {
try {
broker.setCurrentID(id);
}
catch (BadIDException e) {
Messages.showErrorDialog(IdeBundle.message("help.topic.not.found.error", id), CommonBundle.getErrorTitle());
return;
}
}
broker.setDisplayed(true);
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:41,代码来源:HelpManagerImpl.java
示例16: createHeaderPanel
import com.intellij.openapi.application.ex.ApplicationInfoEx; //导入依赖的package包/类
private static JPanel createHeaderPanel() {
JPanel header = new JPanel(new BorderLayout());
JLabel welcome = new JLabel("Welcome to " + ApplicationNamesInfo.getInstance().getFullProductName(),
IconLoader.getIcon(ApplicationInfoEx.getInstanceEx().getWelcomeScreenLogoUrl()),
SwingConstants.LEFT);
welcome.setBorder(new EmptyBorder(10, 15, 10, 15));
welcome.setFont(welcome.getFont().deriveFont((float) 32));
welcome.setIconTextGap(20);
welcome.setForeground(WelcomeScreenColors.WELCOME_HEADER_FOREGROUND);
header.add(welcome);
header.setBackground(WelcomeScreenColors.WELCOME_HEADER_BACKGROUND);
header.setBorder(new BottomLineBorder());
return header;
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:16,代码来源:NewWelcomeScreen.java
示例17: createLogo
import com.intellij.openapi.application.ex.ApplicationInfoEx; //导入依赖的package包/类
private JComponent createLogo() {
NonOpaquePanel panel = new NonOpaquePanel(new BorderLayout());
ApplicationInfoEx app = ApplicationInfoEx.getInstanceEx();
JLabel logo = new JLabel(IconLoader.getIcon(app.getWelcomeScreenLogoUrl()));
logo.setBorder(JBUI.Borders.empty(30,0,10,0));
logo.setHorizontalAlignment(SwingConstants.CENTER);
panel.add(logo, BorderLayout.NORTH);
JLabel appName = new JLabel(ApplicationNamesInfo.getInstance().getFullProductName());
Font font = getProductFont();
appName.setForeground(JBColor.foreground());
appName.setFont(font.deriveFont(JBUI.scale(36f)).deriveFont(Font.PLAIN));
appName.setHorizontalAlignment(SwingConstants.CENTER);
String appVersion = "Version " + app.getFullVersion();
if (app.isEAP() && app.getBuild().getBuildNumber() < Integer.MAX_VALUE) {
appVersion += " (" + app.getBuild().asString() + ")";
}
JLabel version = new JLabel(appVersion);
version.setFont(getProductFont().deriveFont(JBUI.scale(16f)));
version.setHorizontalAlignment(SwingConstants.CENTER);
version.setForeground(Gray._128);
panel.add(appName);
panel.add(version, BorderLayout.SOUTH);
panel.setBorder(JBUI.Borders.emptyBottom(20));
return panel;
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:29,代码来源:FlatWelcomeFrame.java
示例18: prepareUpdateCheckArgs
import com.intellij.openapi.application.ex.ApplicationInfoEx; //导入依赖的package包/类
private static void prepareUpdateCheckArgs(URIBuilder uriBuilder) {
addUpdateRequestParameter("build", ApplicationInfo.getInstance().getBuild().asString());
addUpdateRequestParameter("uid", getInstallationUID(PropertiesComponent.getInstance()));
addUpdateRequestParameter("os", SystemInfo.OS_NAME + ' ' + SystemInfo.OS_VERSION);
if (ApplicationInfoEx.getInstanceEx().isEAP()) {
addUpdateRequestParameter("eap", "");
}
for (String name : ourAdditionalRequestOptions.keySet()) {
String value = ourAdditionalRequestOptions.get(name);
uriBuilder.addParameter(name, StringUtil.isEmpty(value) ? null : value);
}
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:14,代码来源:UpdateChecker.java
示例19: Splash
import com.intellij.openapi.application.ex.ApplicationInfoEx; //导入依赖的package包/类
public Splash(ApplicationInfoEx info) {
this(info.getSplashImageUrl(), info.getSplashTextColor());
if (info instanceof ApplicationInfoImpl) {
final ApplicationInfoImpl appInfo = (ApplicationInfoImpl)info;
myProgressHeight = appInfo.getProgressHeight();
myProgressColor = appInfo.getProgressColor();
myProgressX = appInfo.getProgressX();
myProgressY = appInfo.getProgressY();
myProgressTail = appInfo.getProgressTailIcon();
}
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:Splash.java
示例20: showLicenseeInfo
import com.intellij.openapi.application.ex.ApplicationInfoEx; //导入依赖的package包/类
public static boolean showLicenseeInfo(Graphics g, int x, int y, final int height, final Color textColor) {
if (ApplicationInfoImpl.getShadowInstance().showLicenseeInfo()) {
final LicensingFacade provider = LicensingFacade.getInstance();
if (provider != null) {
UIUtil.applyRenderingHints(g);
g.setFont(new Font(UIUtil.ARIAL_FONT_NAME, Font.BOLD, JBUI.scale(Registry.is("ide.new.about") ? 12 : SystemInfo.isUnix ? 10 : 11)));
g.setColor(textColor);
final String licensedToMessage = provider.getLicensedToMessage();
final List<String> licenseRestrictionsMessages = provider.getLicenseRestrictionsMessages();
int offsetX = JBUI.scale(15);
if (Registry.is("ide.new.about")) {
ApplicationInfoEx infoEx = ApplicationInfoEx.getInstanceEx();
if (infoEx instanceof ApplicationInfoImpl) {
offsetX = ((ApplicationInfoImpl)infoEx).getProgressX();
} else {
return false;
}
}
int offsetY = Registry.is("ide.new.about") ? 85 : 30;
g.drawString(licensedToMessage, x + offsetX, y + height - JBUI.scale(offsetY));
if (licenseRestrictionsMessages.size() > 0) {
g.drawString(licenseRestrictionsMessages.get(0), x + offsetX, y + height - JBUI.scale(offsetY - 16));
}
}
return true;
}
return false;
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:30,代码来源:Splash.java
注:本文中的com.intellij.openapi.application.ex.ApplicationInfoEx类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论