mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
NotNull
StreamProvider — default impl of isEnabled
This commit is contained in:
@@ -25,9 +25,8 @@ public abstract class SchemesManagerFactory {
|
||||
public static final ExtensionPointName<ServiceBean> SCHEME_OWNER = ExtensionPointName.create("com.intellij.schemeOwner");
|
||||
|
||||
public abstract <T extends Scheme, E extends ExternalizableScheme> SchemesManager<T, E> createSchemesManager(@NotNull String fileSpec,
|
||||
@NotNull SchemeProcessor<E> processor,
|
||||
@NotNull RoamingType roamingType);
|
||||
|
||||
@NotNull SchemeProcessor<E> processor, @NotNull RoamingType roamingType);
|
||||
@NotNull
|
||||
public static SchemesManagerFactory getInstance() {
|
||||
return ServiceManager.getService(SchemesManagerFactory.class);
|
||||
}
|
||||
|
||||
@@ -34,6 +34,7 @@ public abstract class ProgressManager extends ProgressIndicatorProvider {
|
||||
private static final ProgressManager ourInstance = ServiceManager.getService(ProgressManager.class);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static ProgressManager getInstance() {
|
||||
return ProgressManagerHolder.ourInstance;
|
||||
}
|
||||
|
||||
@@ -229,7 +229,7 @@ public abstract class AnAction implements PossiblyDumbAware {
|
||||
*
|
||||
* @param e Carries information on the invocation place and data available
|
||||
*/
|
||||
public void update(AnActionEvent e) {
|
||||
public void update(@NotNull AnActionEvent e) {
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -268,7 +268,7 @@ public abstract class AnAction implements PossiblyDumbAware {
|
||||
*
|
||||
* @param e Carries information on the invocation place
|
||||
*/
|
||||
public abstract void actionPerformed(AnActionEvent e);
|
||||
public abstract void actionPerformed(@NotNull AnActionEvent e);
|
||||
|
||||
protected void setShortcutSet(ShortcutSet shortcutSet) {
|
||||
myShortcutSet = shortcutSet;
|
||||
|
||||
@@ -54,18 +54,22 @@ public final class NotificationGroup {
|
||||
ourRegisteredGroups.put(displayId, this);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static NotificationGroup balloonGroup(@NotNull String displayId) {
|
||||
return new NotificationGroup(displayId, NotificationDisplayType.BALLOON, true);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static NotificationGroup logOnlyGroup(@NotNull String displayId) {
|
||||
return new NotificationGroup(displayId, NotificationDisplayType.NONE, true);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static NotificationGroup toolWindowGroup(@NotNull String displayId, @NotNull String toolWindowId, final boolean logByDefault) {
|
||||
return new NotificationGroup(displayId, NotificationDisplayType.TOOL_WINDOW, logByDefault, toolWindowId);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static NotificationGroup toolWindowGroup(@NotNull String displayId, @NotNull String toolWindowId) {
|
||||
return toolWindowGroup(displayId, toolWindowId, true);
|
||||
}
|
||||
@@ -78,10 +82,12 @@ public final class NotificationGroup {
|
||||
return createNotification(content, type.toNotificationType());
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public Notification createNotification(@NotNull final String content, @NotNull final NotificationType type) {
|
||||
return createNotification("", content, type, null);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public Notification createNotification(@NotNull final String title,
|
||||
@NotNull final String content,
|
||||
@NotNull final NotificationType type,
|
||||
|
||||
@@ -17,9 +17,10 @@ package com.intellij.ide;
|
||||
|
||||
import com.intellij.openapi.application.Application;
|
||||
import com.intellij.openapi.extensions.ExtensionPointName;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public interface ApplicationLoadListener {
|
||||
ExtensionPointName<ApplicationLoadListener> EP_NAME = ExtensionPointName.create("com.intellij.ApplicationLoadListener");
|
||||
|
||||
void beforeApplicationLoaded(Application application);
|
||||
void beforeApplicationLoaded(@NotNull Application application);
|
||||
}
|
||||
|
||||
+1
@@ -42,6 +42,7 @@ public interface StateStorageManager {
|
||||
@Nullable
|
||||
StateStorage getFileStateStorage(@NotNull String fileSpec);
|
||||
|
||||
@NotNull
|
||||
Collection<String> getStorageFileNames();
|
||||
|
||||
void clearStateStorage(@NotNull String file);
|
||||
|
||||
+3
-1
@@ -12,7 +12,9 @@ import java.util.Collections;
|
||||
public abstract class StreamProvider {
|
||||
public static final StreamProvider[] EMPTY_ARRAY = new StreamProvider[0];
|
||||
|
||||
public abstract boolean isEnabled();
|
||||
public boolean isEnabled() {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* If true, special version file per storage file will keep version of component.
|
||||
|
||||
-5
@@ -96,11 +96,6 @@ public class ApplicationStoreTest extends LightPlatformLangTestCase {
|
||||
private static class MyStreamProvider extends StreamProvider {
|
||||
public final Map<RoamingType, Map<String, String>> data = new THashMap<RoamingType, Map<String, String>>();
|
||||
|
||||
@Override
|
||||
public boolean isEnabled() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveContent(@NotNull String fileSpec,
|
||||
@NotNull byte[] content,
|
||||
|
||||
Reference in New Issue
Block a user