congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
ModuleContext.getLogger
Code IndexAdd Tabnine to your IDE (free)

How to use
getLogger
method
in
com.bc.ceres.core.runtime.ModuleContext

Best Java code snippets using com.bc.ceres.core.runtime.ModuleContext.getLogger (Showing top 8 results out of 315)

origin: bcdev/beam

private void registerActionGroups(ModuleContext moduleContext) {
  actionGroupList = BeamCoreActivator.loadExecutableExtensions(moduleContext,
                                 "actionGroups",
                                 "actionGroup",
                                 CommandGroup.class);
  HashMap<String, CommandGroup> actionGroupMap = new HashMap<>(2 * actionGroupList.size() + 1);
  for (CommandGroup actionGroup : new ArrayList<>(actionGroupList)) {
    final String actionGroupId = actionGroup.getCommandID();
    final CommandGroup existingActionGroup = actionGroupMap.get(actionGroupId);
    if (existingActionGroup != null) {
      moduleContext.getLogger().warning(String.format("Action group [%s] has been redeclared!\n", actionGroupId));
      actionGroupMap.remove(actionGroupId);
      actionGroupList.remove(existingActionGroup);
    }
    actionGroupMap.put(actionGroupId, actionGroup);
  }
}
origin: bcdev/beam

private void registerActions(ModuleContext moduleContext) {
  actionList = BeamCoreActivator.loadExecutableExtensions(moduleContext,
                              "actions",
                              "action",
                              Command.class);
  HashMap<String, Command> actionMap = new HashMap<>(2 * actionList.size() + 1);
  for (Command action : new ArrayList<>(actionList)) {
    final String actionId = action.getCommandID();
    final Command existingAction = actionMap.get(actionId);
    if (existingAction != null) {
      moduleContext.getLogger().warning(String.format("Action [%s] has been redeclared!\n", actionId));
      actionMap.remove(actionId);
      actionList.remove(existingAction);
    }
    actionMap.put(actionId, action);
  }
}
origin: bcdev/beam

private void registerToolViews(ModuleContext moduleContext) {
  List<ToolViewDescriptor> toolViewDescriptorList = BeamCoreActivator.loadExecutableExtensions(moduleContext,
                                                 "toolViews",
                                                 "toolView",
                                                 ToolViewDescriptor.class);
  toolViewDescriptorRegistry = new HashMap<>(2 * toolViewDescriptorList.size());
  for (ToolViewDescriptor toolViewDescriptor : toolViewDescriptorList) {
    final String toolViewId = toolViewDescriptor.getId();
    final ToolViewDescriptor existingViewDescriptor = toolViewDescriptorRegistry.get(toolViewId);
    if (existingViewDescriptor != null) {
      moduleContext.getLogger().info(String.format("Tool view [%s] has been redeclared!\n", toolViewId));
    }
    toolViewDescriptorRegistry.put(toolViewId, toolViewDescriptor);
  }
}
origin: bcdev/beam

private void registerLayerSources(ModuleContext moduleContext) {
  List<LayerSourceDescriptor> layerSourceListDescriptor =
      BeamCoreActivator.loadExecutableExtensions(moduleContext,
                            "layerSources",
                            "layerSource",
                            LayerSourceDescriptor.class);
  layerSourcesRegistry = new HashMap<>(2 * layerSourceListDescriptor.size());
  for (LayerSourceDescriptor layerSourceDescriptor : layerSourceListDescriptor) {
    final String id = layerSourceDescriptor.getId();
    final LayerSourceDescriptor existingLayerSourceDescriptor = layerSourcesRegistry.get(id);
    if (existingLayerSourceDescriptor
        != null) {
      moduleContext.getLogger().info(String.format("Layer source [%s] has been redeclared!\n", id));
    }
    layerSourcesRegistry.put(id, layerSourceDescriptor);
  }
}
origin: bcdev/beam

private void registerApplicationDescriptors(ModuleContext moduleContext) {
  final List<ApplicationDescriptor> applicationDescriptorList = BeamCoreActivator.loadExecutableExtensions(moduleContext, "applicationDescriptors", "applicationDescriptor", ApplicationDescriptor.class);
  final String applicationId = getApplicationId();
  for (ApplicationDescriptor applicationDescriptor : applicationDescriptorList) {
    if (applicationId.equals(applicationDescriptor.getApplicationId())) {
      moduleContext.getLogger().info(String.format("Using application descriptor [%s]", applicationId));
      this.applicationDescriptor = applicationDescriptor;
      final String[] toolViewIds = applicationDescriptor.getExcludedToolViews();
      for (String toolViewId : toolViewIds) {
        BeamUiActivator.getInstance().removeToolViewDescriptor(toolViewId);
        moduleContext.getLogger().info(String.format("Removed toolview [%s]", toolViewId));
      }
      final String[] actionIds = applicationDescriptor.getExcludedActions();
      for (String actionId : actionIds) {
        BeamUiActivator.getInstance().removeAction(actionId);
        moduleContext.getLogger().info(String.format("Removed action [%s]", actionId));
      }
      final String[] actionGroupIds = applicationDescriptor.getExcludedActionGroups();
      for (String actionGroupId : actionGroupIds) {
        BeamUiActivator.getInstance().removeActionGroup(actionGroupId);
        moduleContext.getLogger().info(String.format("Removed action group [%s]", actionGroupId));
      }
    } else {
      moduleContext.getLogger().warning(String.format("Ignoring application descriptor [%s]", applicationId));
    }
  }
}
origin: bcdev/beam

public static <T> void loadServices(ServiceRegistry<T> registry) {
  Iterable<T> iterable = SystemUtils.loadServices(registry.getServiceType());
  final Iterator<T> iterator = iterable.iterator();
  //noinspection WhileLoopReplaceableByForEach
  while (iterator.hasNext()) {
    try {
      registry.addService(iterator.next());
    } catch (ServiceConfigurationError e) {
      final Logger logger;
      if (moduleContext != null) {
        logger = moduleContext.getLogger();
      } else {
        logger = BeamLogManager.getSystemLogger();
      }
      logger.log(Level.WARNING, e.getMessage(), e.getCause());
    }
  }
}
origin: bcdev/beam

  String message = String.format("Missing resource [path] element in a help set declared in module [%s].",
                  declaringModule.getName());
  moduleContext.getLogger().severe(message);
  return;
  String message = String.format("Help set resource path [%s] of module [%s] not found.",
                  helpSetPath, declaringModule.getName());
  moduleContext.getLogger().severe(message);
  return;
DefaultHelpSetFactory factory = new VerifyingHelpSetFactory(helpSetPath, declaringModule.getName(), moduleContext.getLogger());
HelpSet helpSet = HelpSet.parse(helpSetUrl, declaringModule.getClassLoader(), factory);
                  helpSetPath, declaringModule.getName(),
                  "");
  moduleContext.getLogger().log(Level.SEVERE, message, "");
  return;
                  helpSetPath,
                  declaringModule.getSymbolicName());
  moduleContext.getLogger().warning(message);
                  helpSetPath,
                  declaringModule.getName());
  moduleContext.getLogger().severe(message);
origin: bcdev/beam

public static <T> List<T> loadExecutableExtensions(ModuleContext moduleContext,
                          String extensionPointId,
                          String elementName,
                          Class<T> extensionType) {
  Module module = moduleContext.getModule();
  ExtensionPoint extensionPoint = module.getExtensionPoint(extensionPointId);
  ConfigurationElement[] configurationElements = extensionPoint.getConfigurationElements();
  List<T> executableExtensions = new ArrayList<>(32);
  for (ConfigurationElement configurationElement : configurationElements) {
    ConfigurationElement[] children = configurationElement.getChildren(elementName);
    for (ConfigurationElement child : children) {
      try {
        ModuleState moduleState = child.getDeclaringExtension().getDeclaringModule().getState();
        if (moduleState.isOneOf(ModuleState.STARTING, ModuleState.RESOLVED)) {
          T executableExtension = child.createExecutableExtension(extensionType);
          executableExtensions.add(executableExtension);
        }
      } catch (CoreException e) {
        moduleContext.getLogger().log(Level.SEVERE, e.getMessage(), e);
      }
    }
  }
  return executableExtensions;
}
com.bc.ceres.core.runtimeModuleContextgetLogger

Popular methods of ModuleContext

  • getRuntimeConfig
  • getModule
  • getModules

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getSystemService (Context)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • setScale (BigDecimal)
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • JButton (javax.swing)
  • 21 Best IntelliJ Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now