Merge commit 'origin/master'

This commit is contained in:
sweinreuter
2012-11-29 10:51:35 +01:00
18 changed files with 101 additions and 47 deletions
@@ -9,7 +9,11 @@
<package code="__PACKAGE_CODE__"/>
<names product="IDEA" fullname="IntelliJ IDEA" script="idea"/>
<welcome-screen caption-url="/welcomeCaption_community.png" slogan-url="/developSlogan_community.png"/>
<welcome-screen logo-url="/Logo_welcomeScreen.png"
caption-url="/welcomeCaption_community.png"
slogan-url="/developSlogan_community.png"/>
<editor background-url="/idea_logo_background.png"/>
<update-urls check="http://www.jetbrains.com/updates/updates.xml"
patches="http://download.jetbrains.com/idea/"/>
@@ -8,7 +8,9 @@
<package code="__PACKAGE_CODE__"/>
<names product="IDEA" fullname="IntelliJ IDEA"/>
<welcome-screen caption-url="/welcomeCaption_community.png" slogan-url="/developSlogan_community.png"/>
<welcome-screen logo-url="/Logo_welcomeScreen.png"
caption-url="/welcomeCaption_community.png"
slogan-url="/developSlogan_community.png"/>
<update-urls check="http://www.jetbrains.com/updates/updates.xml"
patches="http://download.jetbrains.com/idea/"/>

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

Before

Width:  |  Height:  |  Size: 8.6 KiB

After

Width:  |  Height:  |  Size: 8.6 KiB

@@ -29,7 +29,7 @@ public class ShowSplashAction extends AnAction {
@Override
public void actionPerformed(AnActionEvent e) {
final ApplicationInfoEx app = ApplicationInfoImpl.getShadowInstance();
final Splash splash = new Splash(app.getLogoUrl(), app.getLogoTextColor());
final Splash splash = new Splash(app.getSplashImageUrl(), app.getSplashTextColor());
final SplashListener listener = new SplashListener(splash);
splash.addFocusListener(listener);
splash.addKeyListener(listener);
@@ -56,7 +56,7 @@ public class AboutDialog extends JDialog {
ApplicationInfoEx appInfo = (ApplicationInfoEx)ApplicationInfo.getInstance();
JPanel mainPanel = new JPanel(new BorderLayout());
final JComponent closeListenerOwner;
Icon image = IconLoader.getIcon(appInfo.getAboutLogoUrl());
Icon image = IconLoader.getIcon(appInfo.getAboutImageUrl());
final InfoSurface infoSurface;
if (appInfo.showLicenseeInfo()) {
infoSurface = new InfoSurface(image);
@@ -153,7 +153,7 @@ public class AboutDialog extends JDialog {
setOpaque(false);
col = Color.white;
final ApplicationInfoEx info = ApplicationInfoEx.getInstanceEx();
linkCol = info.getLogoTextColor();
linkCol = info.getSplashTextColor();
setBackground(col);
ApplicationInfoEx ideInfo = (ApplicationInfoEx)ApplicationInfo.getInstance();
Calendar cal = ideInfo.getBuildDate();
@@ -267,7 +267,7 @@ public class IdeaApplication {
private void updateSplashScreen(ApplicationInfoEx appInfo, SplashScreen splashScreen) {
final Graphics2D graphics = splashScreen.createGraphics();
final Dimension size = splashScreen.getSize();
if (Splash.showLicenseeInfo(graphics, 0, 0, size.height, appInfo.getLogoTextColor())) {
if (Splash.showLicenseeInfo(graphics, 0, 0, size.height, appInfo.getSplashTextColor())) {
splashScreen.update();
}
}
@@ -38,11 +38,11 @@ public abstract class ApplicationInfoEx extends ApplicationInfo {
public abstract Calendar getMajorReleaseBuildDate();
public abstract String getLogoUrl();
public abstract String getSplashImageUrl();
public abstract Color getLogoTextColor();
public abstract Color getSplashTextColor();
public abstract String getAboutLogoUrl();
public abstract String getAboutImageUrl();
public abstract String getIconUrl();
@@ -52,6 +52,14 @@ public abstract class ApplicationInfoEx extends ApplicationInfo {
public abstract String getToolWindowIconUrl();
public abstract String getWelcomeScreenCaptionUrl();
public abstract String getWelcomeScreenDeveloperSloganUrl();
public abstract String getWelcomeScreenLogoUrl();
public abstract String getEditorBackgroundImageUrl();
public abstract String getPackageCode();
public abstract String getFullApplicationName();
@@ -59,10 +67,6 @@ public abstract class ApplicationInfoEx extends ApplicationInfo {
public abstract boolean showLicenseeInfo();
public abstract String getWelcomeScreenCaptionUrl();
public abstract String getWelcomeScreenDeveloperSloganUrl();
public abstract boolean isEAP();
@@ -47,19 +47,22 @@ public class ApplicationInfoImpl extends ApplicationInfoEx implements JDOMExtern
private String myMajorVersion = null;
private String myMinorVersion = null;
private String myBuildNumber = null;
private String myLogoUrl = null;
private String myCompanyName = "JetBrains s.r.o.";
private String myCompanyUrl = "http://www.jetbrains.com/";
private Color myLogoTextColor = new Color(0, 35, 135); // idea blue
private Color myProgressColor = null;
private Icon myProgressTailIcon = null;
private int myProgressY = 350;
private String myAboutLogoUrl = null;
private String mySplashImageUrl = null;
private String myAboutImageUrl = null;
private Color mySplashTextColor = new Color(0, 35, 135); // idea blue
@NonNls private String myIconUrl = "/icon.png";
@NonNls private String mySmallIconUrl = "/icon_small.png";
@NonNls private String myOpaqueIconUrl = "/icon.png";
@NonNls private String myToolWindowIconUrl = "/toolwindows/toolWindowProject.png";
private String myWelcomeScreenLogoUrl = null;
private String myEditorBackgroundImageUrl = null;
private Calendar myBuildDate = null;
private Calendar myMajorReleaseBuildDate = null;
private String myPackageCode = null;
@@ -114,7 +117,10 @@ public class ApplicationInfoImpl extends ApplicationInfoEx implements JDOMExtern
@NonNls private static final String ATTRIBUTE_SHOW = "show";
@NonNls private static final String WELCOME_SCREEN_ELEMENT_NAME = "welcome-screen";
@NonNls private static final String CAPTION_URL_ATTR = "caption-url";
@NonNls private static final String LOGO_URL_ATTR = "logo-url";
@NonNls private static final String SLOGAN_URL_ATTR = "slogan-url";
@NonNls private static final String ELEMENT_EDITOR = "editor";
@NonNls private static final String BACKGROUND_URL_ATTR = "background-url";
@NonNls private static final String UPDATE_URLS_ELEMENT_NAME = "update-urls";
@NonNls private static final String XML_EXTENSION = ".xml";
@NonNls private static final String ATTRIBUTE_EAP = "eap";
@@ -199,12 +205,16 @@ public class ApplicationInfoImpl extends ApplicationInfoEx implements JDOMExtern
return PathManager.getHomePath() + File.separator + "help" + File.separator + myHelpFileName;
}
public String getLogoUrl() {
return myLogoUrl;
public String getSplashImageUrl() {
return mySplashImageUrl;
}
public Color getLogoTextColor() {
return myLogoTextColor;
public Color getSplashTextColor() {
return mySplashTextColor;
}
public String getAboutImageUrl() {
return myAboutImageUrl;
}
public Color getProgressColor() {
@@ -220,10 +230,6 @@ public class ApplicationInfoImpl extends ApplicationInfoEx implements JDOMExtern
return myProgressTailIcon;
}
public String getAboutLogoUrl() {
return myAboutLogoUrl;
}
public String getIconUrl() {
return myIconUrl;
}
@@ -240,10 +246,6 @@ public class ApplicationInfoImpl extends ApplicationInfoEx implements JDOMExtern
return myToolWindowIconUrl;
}
public String getPackageCode() {
return myPackageCode;
}
public String getWelcomeScreenCaptionUrl() {
return myWelcomeScreenCaptionUrl;
}
@@ -252,6 +254,20 @@ public class ApplicationInfoImpl extends ApplicationInfoEx implements JDOMExtern
return myWelcomeScreenDeveloperSloganUrl;
}
@Override
public String getWelcomeScreenLogoUrl() {
return myWelcomeScreenLogoUrl;
}
@Override
public String getEditorBackgroundImageUrl() {
return myEditorBackgroundImageUrl;
}
public String getPackageCode() {
return myPackageCode;
}
public boolean isEAP() {
return myEAP;
}
@@ -407,8 +423,8 @@ public class ApplicationInfoImpl extends ApplicationInfoEx implements JDOMExtern
Element logoElement = parentNode.getChild(ELEMENT_LOGO);
if (logoElement != null) {
myLogoUrl = logoElement.getAttributeValue(ATTRIBUTE_URL);
myLogoTextColor = parseColor(logoElement.getAttributeValue(ATTRIBUTE_TEXT_COLOR));
mySplashImageUrl = logoElement.getAttributeValue(ATTRIBUTE_URL);
mySplashTextColor = parseColor(logoElement.getAttributeValue(ATTRIBUTE_TEXT_COLOR));
String v = logoElement.getAttributeValue(ATTRIBUTE_PROGRESS_COLOR);
if (v != null) {
myProgressColor = parseColor(v);
@@ -427,7 +443,7 @@ public class ApplicationInfoImpl extends ApplicationInfoEx implements JDOMExtern
Element aboutLogoElement = parentNode.getChild(ELEMENT_ABOUT);
if (aboutLogoElement != null) {
myAboutLogoUrl = aboutLogoElement.getAttributeValue(ATTRIBUTE_URL);
myAboutImageUrl = aboutLogoElement.getAttributeValue(ATTRIBUTE_URL);
}
Element iconElement = parentNode.getChild(ELEMENT_ICON);
@@ -453,10 +469,16 @@ public class ApplicationInfoImpl extends ApplicationInfoEx implements JDOMExtern
Element welcomeScreen = parentNode.getChild(WELCOME_SCREEN_ELEMENT_NAME);
if (welcomeScreen != null) {
myWelcomeScreenLogoUrl = welcomeScreen.getAttributeValue(LOGO_URL_ATTR);
myWelcomeScreenCaptionUrl = welcomeScreen.getAttributeValue(CAPTION_URL_ATTR);
myWelcomeScreenDeveloperSloganUrl = welcomeScreen.getAttributeValue(SLOGAN_URL_ATTR);
}
Element editor = parentNode.getChild(ELEMENT_EDITOR);
if (editor != null) {
myEditorBackgroundImageUrl = editor.getAttributeValue(BACKGROUND_URL_ATTR);
}
Element helpElement = parentNode.getChild(HELP_ELEMENT_NAME);
if (helpElement != null) {
myHelpFileName = helpElement.getAttributeValue(ATTRIBUTE_HELP_FILE);
@@ -20,6 +20,7 @@ import com.intellij.openapi.actionSystem.KeyboardShortcut;
import com.intellij.openapi.actionSystem.Shortcut;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.application.ModalityState;
import com.intellij.openapi.application.ex.ApplicationInfoEx;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.fileEditor.FileEditor;
import com.intellij.openapi.fileEditor.impl.text.FileDropHandler;
@@ -41,6 +42,7 @@ import com.intellij.ui.components.JBPanel;
import com.intellij.ui.docking.DockManager;
import com.intellij.ui.tabs.JBTabs;
import com.intellij.util.Alarm;
import com.intellij.util.IconUtil;
import com.intellij.util.PairFunction;
import com.intellij.util.PlatformUtils;
import com.intellij.util.containers.ArrayListSet;
@@ -79,9 +81,8 @@ public class EditorsSplitters extends JBPanel {
super(new BorderLayout());
if (UIUtil.isUnderDarcula()) {
setBackgroundImage(IconLoader.getIcon("/frame_background.png"));
if (PlatformUtils.isIntelliJ()) {
setCenterImage(IconLoader.getIcon("/idea_logo_background.png"));
}
String icon = ApplicationInfoEx.getInstanceEx().getEditorBackgroundImageUrl();
if (icon != null) setCenterImage(IconLoader.getIcon(icon));
}
setOpaque(false);
myManager = manager;
@@ -27,6 +27,7 @@ import com.intellij.openapi.Disposable;
import com.intellij.openapi.actionSystem.*;
import com.intellij.openapi.actionSystem.ex.ActionManagerEx;
import com.intellij.openapi.application.Application;
import com.intellij.openapi.application.ex.ApplicationInfoEx;
import com.intellij.openapi.extensions.Extensions;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.Comparing;
@@ -159,8 +160,9 @@ public class IdeRootPane extends JRootPane implements UISettingsListener {
@Override
protected void paintComponent(Graphics g) {
super.paintComponent(g);
if (UIUtil.isUnderDarcula() && PlatformUtils.isIntelliJ()) {
IconUtil.paintInCenterOf(this, g, IconLoader.getIcon("/idea_logo_background.png"));
if (UIUtil.isUnderDarcula()) {
String icon = ApplicationInfoEx.getInstanceEx().getEditorBackgroundImageUrl();
if (icon != null) IconUtil.paintInCenterOf(this, g, IconLoader.getIcon(icon));
}
}
};
@@ -135,9 +135,8 @@ public class DefaultWelcomeScreen implements WelcomeScreen {
};
myWelcomePanel.setBackgroundImage(IconLoader.getIcon("/frame_background.png"));
if (PlatformUtils.isIntelliJ()) {
myWelcomePanel.setCenterImage(IconLoader.getIcon("idea_logo_background.png"));
}
String icon = ApplicationInfoEx.getInstanceEx().getEditorBackgroundImageUrl();
if (icon != null) myWelcomePanel.setCenterImage(IconLoader.getIcon(icon));
// Create caption pane
JPanel topPanel = createCaptionPane();
@@ -23,8 +23,10 @@ import com.intellij.icons.AllIcons;
import com.intellij.openapi.actionSystem.*;
import com.intellij.openapi.application.ApplicationInfo;
import com.intellij.openapi.application.ApplicationNamesInfo;
import com.intellij.openapi.application.ex.ApplicationInfoEx;
import com.intellij.openapi.updateSettings.impl.CheckForUpdateAction;
import com.intellij.openapi.updateSettings.impl.UpdateSettings;
import com.intellij.openapi.util.IconLoader;
import com.intellij.openapi.wm.WelcomeScreen;
import com.intellij.ui.components.labels.LinkLabel;
import com.intellij.ui.components.labels.LinkListener;
@@ -103,7 +105,9 @@ public class NewWelcomeScreen extends JPanel implements WelcomeScreen {
private JPanel createHeaderPanel() {
JPanel header = new JPanel(new BorderLayout());
JLabel welcome = new JLabel("Welcome to " + ApplicationNamesInfo.getInstance().getFullProductName(), AllIcons.General.Logo_welcomeScreen, SwingConstants.LEFT);
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);
@@ -81,7 +81,7 @@ public class Splash extends JDialog implements StartupProgress {
}
public Splash(ApplicationInfoEx info) {
this(info.getLogoUrl(), info.getLogoTextColor());
this(info.getSplashImageUrl(), info.getSplashTextColor());
if (info instanceof ApplicationInfoImpl) {
final ApplicationInfoImpl appInfo = (ApplicationInfoImpl)info;
myProgressHeight = 2;
@@ -7,7 +7,9 @@
<package code="__PACKAGE_CODE__"/>
<names product="IDEA" fullname="IntelliJ IDEA"/>
<welcome-screen caption-url="/general/welcomeCaption.png" slogan-url="/general/developSlogan.png"/>
<welcome-screen logo-url="/Logo_welcomeScreen.png"
caption-url="/general/welcomeCaption.png"
slogan-url="/general/developSlogan.png"/>
<update-urls check="http://www.jetbrains.com/updates/update.xml" download="http://www.jetbrains.com/idea/download/"/>
<eap-update-urls check="http://www.jetbrains.com/updates/eap-update.xml" download="http://www.intellij.net/eap/products/idea/download.jsp"/>
@@ -416,7 +416,6 @@ public class AllIcons {
public static final Icon Keymap = IconLoader.getIcon("/general/keymap.png"); // 32x32
public static final Icon Locate = IconLoader.getIcon("/general/locate.png"); // 14x16
public static final Icon LocateHover = IconLoader.getIcon("/general/locateHover.png"); // 14x16
public static final Icon Logo_welcomeScreen = IconLoader.getIcon("/general/Logo_welcomeScreen.png"); // 80x80
public static final Icon MacCorner = IconLoader.getIcon("/general/macCorner.png"); // 16x16
public static final Icon Mdot_empty = IconLoader.getIcon("/general/mdot-empty.png"); // 8x8
public static final Icon Mdot_white = IconLoader.getIcon("/general/mdot-white.png"); // 8x8
@@ -622,6 +621,7 @@ public class AllIcons {
}
public static final Icon Idea_logo_background = IconLoader.getIcon("/idea_logo_background.png"); // 500x500
public static final Icon Idea_logo_welcome = IconLoader.getIcon("/idea_logo_welcome.png"); // 100x100
public static final Icon Logo_welcomeScreen = IconLoader.getIcon("/Logo_welcomeScreen.png"); // 80x80
public static class Javaee {
public static final Icon Application_xml = IconLoader.getIcon("/javaee/application_xml.png"); // 16x16
@@ -198,9 +198,21 @@ public class GroovyCompilerWrapper {
if (module == null) {
module = findModule(astNode);
}
collector.add(new CompilerMessage(GroovyCompilerMessageCategories.ERROR, exception.getMessageWithoutLocationText(),
module == null ? "<no module>" : module.getDescription(),
astNode.getLineNumber(), astNode.getColumnNumber()));
String moduleName = module == null ? "<no module>" : module.getDescription();
int lineNumber = astNode == null ? -1 : astNode.getLineNumber();
int columnNumber = astNode == null ? -1 : astNode.getColumnNumber();
String message = exception.getMessageWithoutLocationText();
if (message == null) {
StringWriter stringWriter = new StringWriter();
//noinspection IOResourceOpenedButNotSafelyClosed
PrintWriter writer = new PrintWriter(stringWriter);
exception.printStackTrace(writer);
message = stringWriter.getBuffer().toString();
}
collector.add(new CompilerMessage(GroovyCompilerMessageCategories.ERROR, message, moduleName, lineNumber, columnNumber));
}
private static ModuleNode findModule(ASTNode node) {
@@ -7,7 +7,9 @@
<package code="TeamServer"/>
<names product="IDEA" fullname="IntelliJ IDEA"/>
<welcome-screen caption-url="/general/welcomeCaption.png" slogan-url="/general/developSlogan.png"/>
<welcome-screen logo-url="/Logo_welcomeScreen.png"
caption-url="/general/welcomeCaption.png"
slogan-url="/general/developSlogan.png"/>
<update-urls check="http://www.jetbrains.com/updates/update.xml" download="http://www.jetbrains.com/idea/download/"/>
<eap-update-urls check="http://www.jetbrains.com/updates/eap-update.xml" download="http://www.intellij.net/eap/products/idea/download.jsp"/>