Tabnine Logo
PluginUtils.isAtlassianDevMode
Code IndexAdd Tabnine to your IDE (free)

How to use
isAtlassianDevMode
method
in
com.atlassian.plugin.util.PluginUtils

Best Java code snippets using com.atlassian.plugin.util.PluginUtils.isAtlassianDevMode (Showing top 8 results out of 315)

origin: com.atlassian.plugins/atlassian-plugins-webresource

/**
 * If minification enabled.
 */
public boolean isMinificationEnabled() {
  return !(Boolean.getBoolean(DISABLE_MINIFICATION) || PluginUtils.isAtlassianDevMode());
}
origin: com.atlassian.plugins/atlassian-plugins-core

/**
 * Determines if a plugin requires a restart after being installed at runtime. Looks for the annotation
 * {@link RequiresRestart} on the plugin's module descriptors.
 *
 * @param plugin The plugin that was just installed at runtime, but not yet enabled
 * @return True if a restart is required
 * @since 2.1
 */
public static boolean doesPluginRequireRestart(final Plugin plugin) {
  //PLUG-451: When in dev mode, plugins should not require a restart.
  if (isAtlassianDevMode()) {
    return false;
  }
  for (final ModuleDescriptor<?> descriptor : plugin.getModuleDescriptors()) {
    if (descriptor.getClass().getAnnotation(RequiresRestart.class) != null) {
      return true;
    }
  }
  return false;
}
origin: com.atlassian.plugins/atlassian-plugins-webresource-common

if (Boolean.getBoolean(ATLASSIAN_WEBRESOURCE_DISABLE_MINIFICATION) || PluginUtils.isAtlassianDevMode()) {
  return false;
origin: com.atlassian.plugins/atlassian-plugins-core

if (isAtlassianDevMode() && pluginsInEnablingState.size() == 1) {
  final long currentTime = System.currentTimeMillis();
  if (singlePluginTimeout == 0) {
origin: com.atlassian.plugins/atlassian-plugins-osgi

private void assertSpringAvailableIfRequired(final TransformContext context) {
  if (isAtlassianDevMode() && context.shouldRequireSpring()) {
    final String header = context.getManifest().getMainAttributes().getValue(SPRING_CONTEXT);
    if (header == null) {
      log.debug("Manifest has no 'Spring-Context:' header. Prefer the header 'Spring-Context: *' in the jar '{}'.",
          context.getPluginArtifact());
    } else if (header.contains(";timeout:=")) {
      log.warn("Manifest contains a 'Spring-Context:' header with a timeout, namely '{}'. This can cause problems as the "
              + "timeout is server specific. Use the header 'Spring-Context: *' in the jar '{}'.",
          header, context.getPluginArtifact());
    }
    // else there's a Spring-Context with no timeout:=, which is fine.
  }
}
origin: com.atlassian.plugins/atlassian-plugins-webresource

public Config(ResourceBatchingConfiguration batchingConfiguration, WebResourceIntegration integration,
       WebResourceUrlProvider urlProvider, ServletContextFactory servletContextFactory,
       TransformerCache transformerCache, ResourceCompiler resourceCompiler) {
  this.batchingConfiguration = batchingConfiguration;
  this.integration = integration;
  this.urlProvider = urlProvider;
  this.servletContextFactory = servletContextFactory;
  this.transformerCache = transformerCache;
  this.isContentCacheEnabled = !(Boolean.getBoolean(PluginUtils.WEBRESOURCE_DISABLE_FILE_CACHE) ||
      PluginUtils.isAtlassianDevMode());
  this.isUrlCachingEnabled = !Boolean.getBoolean(DISABLE_URL_CACHING);
  this.contentCacheSize = Integer.getInteger(PluginUtils.WEBRESOURCE_FILE_CACHE_SIZE, 1000);
  this.incrementalCacheSize = Integer.getInteger(INCREMENTAL_CACHE_SIZE, 1000);
  this.urlCacheSize = Integer.getInteger(PluginUtils.WEBRESOURCE_FILE_CACHE_SIZE, 200);
  cdnResourceUrlTransformer = new CdnResourceUrlTransformerImpl(this);
  this.resourceCompiler = resourceCompiler == null ? new NoOpResourceCompiler() : resourceCompiler;
  this.usePluginInstallTimeInsteadOfTheVersionForSnapshotPlugins = integration.usePluginInstallTimeInsteadOfTheVersionForSnapshotPlugins();
  this.syncContextCreated = false;
}
origin: com.atlassian.plugins/atlassian-plugins-osgi

@SuppressWarnings("unchecked")
public void execute(TransformContext context) throws PluginTransformationException {
  XPath xpath = DocumentHelper.createXPath("//@class");
  List<Attribute> attributes = xpath.selectNodes(context.getDescriptorDocument());
  for (Attribute attr : attributes) {
    String className = attr.getValue();
    scanForHostComponents(context, className);
    int dotpos = className.lastIndexOf(".");
    if (dotpos > -1) {
      String pkg = className.substring(0, dotpos);
      String pkgPath = pkg.replace('.', '/') + '/';
      // Only add an import if the system exports it and the plugin isn't using the package
      if (context.getSystemExports().isExported(pkg)) {
        if (context.getPluginArtifact().doesResourceExist(pkgPath)) {
          if (isAtlassianDevMode())
            log.warn("The plugin '{}' uses a package '{}' that is also exported by the application. "
                + "It is highly recommended that the plugin use its own packages.",
                context.getPluginArtifact(), pkg);
        } else {
          context.getExtraImports().add(pkg);
        }
      }
    }
  }
}
origin: com.atlassian.plugins/atlassian-plugins-webresource

String msg = webResourceDeprecationWarnings.get(key).buildLogMessage() +
    " (required by \"" + completeKey + "\")";
if (PluginUtils.isAtlassianDevMode()) {
  supportLogger.warn(msg);
} else {
com.atlassian.plugin.utilPluginUtilsisAtlassianDevMode

Popular methods of PluginUtils

  • getDefaultEnablingWaitPeriod
  • doesModuleElementApplyToApplication
    Determines if a module element applies to the current application by matching the 'application' attr
  • doesPluginRequireRestart
    Determines if a plugin requires a restart after being installed at runtime. Looks for the annotation
  • asString
  • getPluginModulesThatRequireRestart
    Gets a list of all the module keys in a plugin that require restart. Looks for the annotation Requir

Popular in Java

  • Updating database using SQL prepared statement
  • addToBackStack (FragmentTransaction)
  • getSystemService (Context)
  • setScale (BigDecimal)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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