diff --git a/community-resources/src/idea/IdeaApplicationInfo.xml b/community-resources/src/idea/IdeaApplicationInfo.xml index 0e6bb914828b..d21b3f47b145 100644 --- a/community-resources/src/idea/IdeaApplicationInfo.xml +++ b/community-resources/src/idea/IdeaApplicationInfo.xml @@ -28,6 +28,7 @@ + diff --git a/platform/core-api/src/com/intellij/openapi/application/ApplicationInfo.java b/platform/core-api/src/com/intellij/openapi/application/ApplicationInfo.java index 576cdc097de8..49fb9077e25c 100644 --- a/platform/core-api/src/com/intellij/openapi/application/ApplicationInfo.java +++ b/platform/core-api/src/com/intellij/openapi/application/ApplicationInfo.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 JetBrains s.r.o. + * Copyright 2000-2015 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -32,6 +32,8 @@ public abstract class ApplicationInfo { public abstract String getCompanyName(); public abstract String getCompanyURL(); public abstract String getThirdPartySoftwareURL(); + public abstract String getJetbrainsTvUrl(); + public abstract Rectangle getAboutLogoRect(); public abstract boolean hasHelp(); public abstract boolean hasContextHelp(); diff --git a/platform/core-impl/src/com/intellij/openapi/application/impl/ApplicationInfoImpl.java b/platform/core-impl/src/com/intellij/openapi/application/impl/ApplicationInfoImpl.java index 01f9a435d074..d75c5d8e6b7c 100644 --- a/platform/core-impl/src/com/intellij/openapi/application/impl/ApplicationInfoImpl.java +++ b/platform/core-impl/src/com/intellij/openapi/application/impl/ApplicationInfoImpl.java @@ -98,6 +98,7 @@ public class ApplicationInfoImpl extends ApplicationInfoEx implements JDOMExtern private String myStatisticsServiceUrl; private String myStatisticsServiceKey; private String myThirdPartySoftwareUrl; + private String myJetbrainsTvUrl; private Rectangle myAboutLogoRect; @@ -167,6 +168,7 @@ public class ApplicationInfoImpl extends ApplicationInfoEx implements JDOMExtern private static final String ATTRIBUTE_STATISTICS_SERVICE = "service"; private static final String ATTRIBUTE_STATISTICS_SERVICE_KEY = "service-key"; private static final String ELEMENT_THIRD_PARTY = "third-party"; + private static final String ELEMENT_JB_TV = "jetbrains-tv"; private static final String CUSTOMIZE_IDE_WIZARD_STEPS = "customize-ide-wizard"; private static final String STEPS_PROVIDER = "provider"; @@ -466,6 +468,11 @@ public class ApplicationInfoImpl extends ApplicationInfoEx implements JDOMExtern return myThirdPartySoftwareUrl; } + @Override + public String getJetbrainsTvUrl() { + return myJetbrainsTvUrl; + } + @Override public Rectangle getAboutLogoRect() { return myAboutLogoRect; @@ -736,6 +743,11 @@ public class ApplicationInfoImpl extends ApplicationInfoEx implements JDOMExtern if (thirdPartyElement != null) { myThirdPartySoftwareUrl = thirdPartyElement.getAttributeValue(ATTRIBUTE_URL); } + + Element tvElement = parentNode.getChild(ELEMENT_JB_TV); + if (tvElement != null) { + myJetbrainsTvUrl = tvElement.getAttributeValue(ATTRIBUTE_URL); + } } private static GregorianCalendar parseDate(final String dateString) { diff --git a/platform/platform-impl/src/com/intellij/openapi/wm/impl/welcomeScreen/JetBrainsTvAction.java b/platform/platform-impl/src/com/intellij/ide/actions/JetBrainsTvAction.java similarity index 54% rename from platform/platform-impl/src/com/intellij/openapi/wm/impl/welcomeScreen/JetBrainsTvAction.java rename to platform/platform-impl/src/com/intellij/ide/actions/JetBrainsTvAction.java index 184f3444175e..9c1798df574b 100644 --- a/platform/platform-impl/src/com/intellij/openapi/wm/impl/welcomeScreen/JetBrainsTvAction.java +++ b/platform/platform-impl/src/com/intellij/ide/actions/JetBrainsTvAction.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2010 JetBrains s.r.o. + * Copyright 2000-2015 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,35 +13,32 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.intellij.openapi.wm.impl.welcomeScreen; +package com.intellij.ide.actions; import com.intellij.ide.BrowserUtil; import com.intellij.openapi.actionSystem.AnAction; import com.intellij.openapi.actionSystem.AnActionEvent; -import com.intellij.openapi.application.ApplicationNamesInfo; +import com.intellij.openapi.application.ApplicationInfo; import com.intellij.openapi.project.DumbAware; -import com.intellij.ui.UIBundle; -import org.jetbrains.annotations.NonNls; -import org.jetbrains.annotations.NotNull; public class JetBrainsTvAction extends AnAction implements DumbAware { - public static final String JETBRAINS_TV_URL = "http://tv.jetbrains.net/"; - private final String myUrl; public JetBrainsTvAction() { - myUrl = JETBRAINS_TV_URL; + myUrl = ApplicationInfo.getInstance().getJetbrainsTvUrl(); } - protected JetBrainsTvAction(@NotNull @NonNls final String channel) { - final String fullProductName = ApplicationNamesInfo.getInstance().getFullProductName(); - getTemplatePresentation().setText(fullProductName + " TV"); - getTemplatePresentation().setDescription(UIBundle.message("welcome.screen.jetbrains.tv.action.description", fullProductName)); - myUrl = JETBRAINS_TV_URL + "channel/" + channel; + @Override + public void update(AnActionEvent e) { + boolean enabled = myUrl != null; + e.getPresentation().setVisible(enabled); + e.getPresentation().setEnabled(enabled); } @Override public void actionPerformed(AnActionEvent e) { - BrowserUtil.browse(myUrl); + if (myUrl != null) { + BrowserUtil.browse(myUrl); + } } } \ No newline at end of file diff --git a/platform/platform-impl/src/com/intellij/openapi/wm/impl/welcomeScreen/IdeaJetBrainsTvAction.java b/platform/platform-impl/src/com/intellij/openapi/wm/impl/welcomeScreen/IdeaJetBrainsTvAction.java deleted file mode 100644 index a5035e333875..000000000000 --- a/platform/platform-impl/src/com/intellij/openapi/wm/impl/welcomeScreen/IdeaJetBrainsTvAction.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2000-2010 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.intellij.openapi.wm.impl.welcomeScreen; - -public class IdeaJetBrainsTvAction extends JetBrainsTvAction { - private static final String CHANNEL = "intellij-idea"; - - public IdeaJetBrainsTvAction() { - super(CHANNEL); - } -} diff --git a/platform/platform-resources-en/src/messages/ActionsBundle.properties b/platform/platform-resources-en/src/messages/ActionsBundle.properties index 559d00a6bd08..399a743331b0 100644 --- a/platform/platform-resources-en/src/messages/ActionsBundle.properties +++ b/platform/platform-resources-en/src/messages/ActionsBundle.properties @@ -1240,7 +1240,8 @@ action.WelcomeScreen.CreateNewProject.text=Create New Project action.WelcomeScreen.CreateNewProject.description=Start the \"New Project\" Wizard that will guide you through the steps necessary for creating a new project. action.WelcomeScreen.ImportProject.text=Import Project action.WelcomeScreen.ImportProject.description=Create {0} project structure for directory with existing sources or convert existing project model. -action.WelcomeScreen.JetBrainsTV.IDEA.text=JetBrains TV +action.WelcomeScreen.JetBrainsTV.text=JetBrains TV +action.WelcomeScreen.JetBrainsTV.description=View short live demos introducing features of JetBrains products. action.WelcomeScreen.Plugins.text=Plugins action.WelcomeScreen.Plugins.description=Manage installed plugins and download new ones from repository action.WelcomeScreen.Configure.Import.text=Import Settings diff --git a/platform/platform-resources/src/idea/PlatformActions.xml b/platform/platform-resources/src/idea/PlatformActions.xml index c31a4715cf88..0be31cc6dec1 100644 --- a/platform/platform-resources/src/idea/PlatformActions.xml +++ b/platform/platform-resources/src/idea/PlatformActions.xml @@ -434,7 +434,7 @@ - + @@ -518,10 +518,9 @@ - - + + + diff --git a/python/edu/resources/idea/PyCharmEduApplicationInfo.xml b/python/edu/resources/idea/PyCharmEduApplicationInfo.xml index 637ae3f741c6..a2172acca92c 100644 --- a/python/edu/resources/idea/PyCharmEduApplicationInfo.xml +++ b/python/edu/resources/idea/PyCharmEduApplicationInfo.xml @@ -19,4 +19,5 @@ release-url="https://www.jetbrains.com/feedback/feedback.jsp?product=PyCharm&build=$BUILD&timezone=$TIMEZONE&eval=$EVAL"/> + diff --git a/python/resources/idea/PyCharmCoreApplicationInfo.xml b/python/resources/idea/PyCharmCoreApplicationInfo.xml index 8fda1df37a1f..bd632c395fdb 100644 --- a/python/resources/idea/PyCharmCoreApplicationInfo.xml +++ b/python/resources/idea/PyCharmCoreApplicationInfo.xml @@ -19,4 +19,5 @@ release-url="https://www.jetbrains.com/feedback/feedback.jsp?product=PyCharm&build=$BUILD&timezone=$TIMEZONE&eval=$EVAL"/> + diff --git a/resources/src/idea/RichPlatformActions.xml b/resources/src/idea/RichPlatformActions.xml index 1f534708c21b..be17a4a46aaa 100644 --- a/resources/src/idea/RichPlatformActions.xml +++ b/resources/src/idea/RichPlatformActions.xml @@ -363,8 +363,6 @@ -