mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-10-06 06:21:16 +07:00
add feature statistics trigger for scratches
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.intellij.ide.scratch;
|
||||
|
||||
import com.intellij.featureStatistics.FeatureUsageTracker;
|
||||
import com.intellij.lang.DependentLanguage;
|
||||
import com.intellij.lang.InjectableLanguage;
|
||||
import com.intellij.lang.Language;
|
||||
@@ -71,6 +72,7 @@ public class NewScratchFileAction extends AnAction implements DumbAware {
|
||||
ListPopup popup = buildLanguagePopup(previous, new Consumer<Language>() {
|
||||
@Override
|
||||
public void consume(Language language) {
|
||||
FeatureUsageTracker.getInstance().triggerFeatureUsed("scratch");
|
||||
VirtualFile file = ScratchpadManager.getInstance(project).createScratchFile(language);
|
||||
FileEditorManager.getInstance(project).openFile(file, true);
|
||||
}
|
||||
|
||||
@@ -122,3 +122,5 @@ find.completion=Completion in Find Bar
|
||||
switcher=Switcher
|
||||
dir.diff=Directory Diff
|
||||
jar.diff=JAR Files Diff
|
||||
|
||||
scratch=New scratch file
|
||||
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" type="text/css" href="css/tips.css">
|
||||
</head>
|
||||
<body>
|
||||
<p>
|
||||
Scratch files allows you experiment and prototype right in the editor,
|
||||
without creating any project files.</p>
|
||||
</body>
|
||||
</html>
|
||||
@@ -246,6 +246,12 @@
|
||||
min-usage-count="10"
|
||||
first-show="2"
|
||||
successive-show="4"/>
|
||||
<feature
|
||||
id="scratch"
|
||||
tip-file="Scratch.html"
|
||||
min-usage-count="10"
|
||||
first-show="2"
|
||||
successive-show="3"/>
|
||||
</group>
|
||||
|
||||
<group id="codeassists">
|
||||
|
||||
Reference in New Issue
Block a user