plugins,settings,jira,webwork,sal , Jira SAL using PluginSettings

Jira SAL using PluginSettings


Tag: plugins,settings,jira,webwork,sal

I looked for a way to store project-specific configurations for my plugin. In the first step i only want to store a simple String like "Hello".

So, what i found is SAL and the PluginSettings.

This seems pretty easy to use but I don´t have any idea how to implement it into my code. I used a WebWork taking place in the project administration section:

public String doDefault() throws Exception {
    Project project = getProjectManager().getProjectObjByKey(_projectKey);
    HttpServletRequest request = ExecutingHttpRequest.get();
    request.setAttribute((new StringBuilder()).append("com.atlassian.jira.projectconfig.util.ServletRequestProjectConfigRequestCache").append(":project").toString(), project);
    return INPUT;

protected String doExecute() throws Exception {
    Project project = getProjectManager().getProjectObjByKey(_projectKey);
    HttpServletRequest request = ExecutingHttpRequest.get();
    request.setAttribute((new StringBuilder()).append("com.atlassian.jira.projectconfig.util.ServletRequestProjectConfigRequestCache").append(":project").toString(), project);
    String param = request.getParameter("param");
    return SUCCESS;

public void setProjectKey(String projectKey) {
    _projectKey = projectKey;

public String getProjectKey() {
    return _projectKey;

public String getBaseUrl() {
    return ComponentAccessor.getApplicationProperties().getString(APKeys.JIRA_BASEURL);

As SAL said i implemented a Settings-Class:

public CustomProjectSettings(
        final PluginSettingsFactory pluginSettingsFactory,
        final String projectKey) {
    this.pluginSettingsFactory = pluginSettingsFactory;
    this.projectKey = projectKey;

public void setValue(final String key, final String value) {
    final PluginSettings settings = pluginSettingsFactory
    settings.put(key, value);

public Object getValue(final String key) {
    final PluginSettings settings = pluginSettingsFactory
    return settings.get(key);

And I added the component in the xml:

<component-import key="pluginSettingsFactory" interface="com.atlassian.sal.api.pluginsettings.PluginSettingsFactory" />

So how do i connect and implement this into my webwork to say

protected String doExecute() throws Exception{
    pluginSettings.setValue("Key", param);


It was easier than i thought. I simply had to inject the Settings as a dependency for my WebWork:

public WebWorkAction(CustomProjectSettings settings){
    this.settings = settings

The Settings-Class gets autowired by

<component-import key="pluginSettingsFactory" 
interface="com.atlassian.sal.api.pluginsettings.PluginSettingsFactory" />

and by adding

<component key="settingsComponent"


Cordova plugin development - adding aar

I am new to the cordova plugin development stuff. I want to write a plugin which is able to open a new android activty and showing some advertisement. So I followed a simple tutorial here. That works very well and as expected. Next step is to include this Android Studio...

How to get Node class instance from MObject in Maya API

In a cpp plugin I am developing in Maya API, I register a custom MPxTransform Node in the initializePlugin function: status=pluginFn.registerTransform("mympxtransform", myMPxTransformClass::id, &myMPxTransformClass::creator, &myMPxTransformClass::initialize, &myMPxTransformMatrixClass::creator, myMPxTransformMatrixClass::id); And then create the node programmatically: MDagModifier mdagmod; MObject MyMObject; MyMObject=mdagmod.createNode("mympxtransform",MObject::kNullObj,&status); I can see the node properly created in the...

need wordpress plugin to show 3 type of different kind of text, image and 2 buttons

I have slider image on page in "featured work" section. I need plugin to create dynamic slider like image in section.I use many sliders like cyclone-slider but they show only title, description and image.

C# - Settings.Default.Save() is very slow

I want to save some UI changes when the program closes. I've read that one of the simplest ways to do that is with settings. I figured I'd save those changes to the settings whenever the program closes, instead of saving it everytime the user changes those settings. So, I...

Can plugins in CustusX implement several interfaces at once?

I want to create a plugin (or two?) for CustusX. The plugin is thought to be used to guide a user through a recording workflow. At the same time, it is supposed to take an image stream, and provide another image stream (original stream + overlay image). So it's supposed...

Vimperator - reload plugin

How can I reload vimperator plugin after I modify it? Now I restart browser each time I need reload but it is nightmare to develop plugins like this.

How to copy a photo from gallery to dataDirectory?

I'm trying to copy a file from photo gallery to dataDirectory on Android 5.0 device. Unfortunely Cordova camera plugin returns path in format like: content://media/external/images/media/8793 var options = { quality: 50, destinationType: Camera.DestinationType.FILE_URI, sourceType: Camera.PictureSourceType.PHOTOLIBRARY, saveToPhotoAlbum: false }; return $cordovaCamera.getPicture(options).then(function (result) { return handlePictureResult(result); }) $cordovaFile.copyFile('content://media/external/images/media/8793', null,...

Eclipse extension point for Open Resource/Open Type dialogs

Is there an extension point where I can customize the search behavior of these dialog boxes? Or am I better off making an extensions that just overrides those hotkeys with dialog boxes that subclass FilteredResourcesSelectionDialog?...

Joomla 3 get configuration of other plugin onAfterInitialize()

Joomla 3 get configuration of other plugin onAfterInitialize() I have two plugins authentication and system. I'd like make action onAfterInitialize event in system event using configuration defined in .xml file of authetication plugin. What's the right way to do it? Do I need separate plugin for configuration and how do...

how can i use require(“”); in javascript

i want to use a plugin in Firefox that it is in this. in this plugin tutorial use require function, and it is: require("sdk/preferences/service"); but i get error that require is not defined. so i search and download requireJS. but when attach this i get error module name sdk/preference/service has...

Can i use font-awesome in android's edittext?

I have added font-awesome .tff file to the assets folder, initlaized some of the icons in the strings.xml file, changed the typefaces of the entities i will use font-awesome in and tried using font-awesome on buttons and it worked, but i did the same for edittexts but there are strings...

How to find out what type a rustc::middle::ty::Ty represents?

For writing yet another lint in Rust, I need to make sure that the type of an Expr is actually an Option<_> (or any pointer to one). I have already walked any ptrs and rptrs to their conclusion and am left with a rustc::middle::ty that in my test case debugs...

disable update for wordpress plugin named Dropbox Folder Share

I have found the following plugin. Dropbox Folder Share which is licensed under the GNU General Public License. In the plugin I have made some minor changes. mainly added my language. but i have also changed som other things. How can I ensure that the plugin will not be updated....

Imagemaps in uCKEditor bad performance

We have been using the uCKEditor plugin for umbraco for a few months now. We also installed a plugin for it called Image Maps. Recently, one of our content editors noticed a sharp drop in performance while editing some pages. After testing it for a while I noticed that removing...

How to analyze code from other class than currently analyzed in SonarQube?

Case: I'm writing SonarQube rule that needs to check if manually created object is being closed. When it's not, issue should be raised. Let's assume that part related to determining if object is created manually (or not) is easy and not relevant. For purpose of this example it'll be...

Media files end up in in a pycharm subdirectory when uploading

I am building a Django application on a Windows system where the user should be able to upload images. But somehow my uploades files end up in my Program Files directory at: C:\Program Files (x86)\JetBrains\PyCharm Community Edition 4.5.1\jre\jre\bin\WebApp\media\TestData\static\images I just can't understand why I get this result. I would like...

Hide Widget based on condition using Widget Logic Plugin

My website ( is a karaoke directory where bars can list karaoke nights for free OR upgrade to a premium or featured premium listing (paid packages) to receive a more robust profile. As part of the benefit to upgrading to a paid package, I'd like to have some widgets disappear...

Minecraft plugin sign reading

I've got problem trying to get values of sign lines in minecraft plugin. Here is my code: package pl.maccraft.regssal; import; import org.bukkit.ChatColor; import org.bukkit.Material; import org.bukkit.block.Block; import org.bukkit.block.Sign; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.bukkit.event.block.Action; import org.bukkit.event.block.SignChangeEvent; import org.bukkit.event.player.PlayerInteractEvent; public final class rgs...

Wordpress plugin: How to depend on other plugins?

I am writing a simple plugin for wordpress (actually a widget, packaged as a plugin, because reasons). I am using bootstrap to style the widget, because reasons. Now, the problem is that should I include bootstrap along the plugin or depend on another plugin (for example The first is...

Debugging a Dynamics CRM Plug-in

I'm having trouble debugging a Dynamics CRM Online (2015) plug-in (C#). I'm following the instructions on this MSDN article to attach to a process. In the Attach To Process window, I select "Show processes from all users" and refresh. However, I don't see any of the four service processes listed...

How to fix Class 'Behat\Behat\Output\Printer\ConsoleOutputPrinter' not found

Im trying to use the Behat plugin for PHPStorm (on Behat 3). the problem is once i try to run a feature i will receiving the following Fatal error: Fatal error: Class 'Behat\Behat\Output\Printer\ConsoleOutputPrinter' not found in /private/var/folders/js/27x3tw5n5jx9b14vn_cn12w0748zmg/T/ide-behat.php on line 82 I had a look in the Behat source i can...

Get position information for videoframes of a video source/probe in CustusX

In a custom plugin for the extension of CustusX which implements GUIExtenderService I want to access the streamed image of an ultrasound probe together with its position. The Documentation says: VideoSource has two main users: Rendering to screen and recording to disk. VideoGraphics contains the visualization functionality that the Reps...

TFS Server plugin fails after upgrade from TFS2012 to TFS2015 RC

We have just upgraded one of our servers from TFS2012.2 to TFS2015RC. Everything went "smooth", but we are encountering an issue: A while ago we wrote a server side plugin for TFS, which listens to the WorkitemChangedEvent. It implements the ISubscriber interface. The following piece of code was working fine...

Android, create “non visible” .apk

I am working on an Android framework which is composed by a main .apk that executes in foreground and a set of "plug-ins" which are .apk that can be downloaded and installed into the device silently. The main purpose of this architecture is to have only 1 application running and...

Reading settings from applicationSettings is very slow?

I have a C# WinForms application that stores 4 settings in my App.config file (specifically in the applicationSettings section). These settings were created via the Project -> Properties -> Settings UI in Visual Studio. My App.config file looks like this: <?xml version="1.0" encoding="utf-8" ?> <configuration> <configSections> <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System,...

Android Settings : How to use SharedPreferences in a SettingsFragment?

I am using my own SharedPreferences in a normal Activity with a custom layout with two checkboxes and seekbars. Now I want to make a proper SettingsActivity/SettingsFragment with these settings. Is there a way to use my custom SharedPreference instead of the PreferenceManager and the default preference file? My own...

How to make a discourse plugin available for public posts?

I've developed a discourse plugin successfully. However, I need to be logged in into discourse in order to see the plugin working. Any ideas?...

Implementing one page scroll by Pete R

Im not good with jquery, js, scripts overall and i´m trying implementing this onepagescroll puglin by Pete R. but till now no sucess. Thinks i´ve done: body { margin: 0; font-family: 'Open Sans', Helvetica, sans-serif; min-width: 900px; } .header { background-image: url("img/fundo1.jpg"); background-size: cover; background-color: rgb(21, 21, 21); color:...

Call to undefined function add_action()

I am developing a plugin for custom registration form.I have first file customapplicationform.php file , other files in side registration and shortcode folder. So, My Plugin Directory structure like this : --->customapplicationform |--js |--ajax-registration.js |--registration |--registration.php |--regsubmit.php |--scripts.php |--shortcode |--display.php |--shortcodes.php --customapplicatioform.php It's give error : Fatal error: Call to...

Is there synthetic tracking data available in CustusX?

I'm developing a plugin for custusX. I prefer developing on my own PC which is not connected to a tracking system. For video, custusX uses a webcam to generate synthetic 'example data'. Is there also a tracking source with synthetic tracking data available that can be used for developing? (Preferable...

npm error : 404 Not Found: cordova-plugin-whitelist

I have installed a cordova-plugin-whitelist in Visual Studio project with cordova from GitHub but when I recompile, I get this error: Calling plugman.fetch on plugin "[email protected]" Fetching plugin "[email protected]" via plugin registry MDAVSCLI : npm error : 404 Not Found: cordova-plugin-whitelist All files of plugin there are correctly under plugin...

Height of input box on Contact 7 form

I am trying to reduce the height of the "Your Message" input box on the Contact 7 form on this page: I've tried the following (with different heights so I can see which one is working) but nothing is working. Thanks for your help. .wpcf7-textarea { height: 80px; }...

Difference between aoColumnDefs and aoColumns

Difference between aoColumnDefs and aoColumns in datatable jquery plugin?

How to inactivate an eclipse plug-in without uninstall it?

How to inactivate an plug-in in Eclipse Kepler SR2 without uninstalling it? I have a plug-in for Android, which is pretty big and causes eclipse starting slow. But I need the plug-in on some other projects. In Help -> About Eclipse > Installation Details -> Installed Software, there is only...

Reuse jquery plugin without conflict

I have a little plugin working as a progressbar. the problem is: I can't update progressbar's value because every change I made, affect just the last object created =( also.. if I call it as: $(node-selector).progBar().setValue() it works calling the correct node but it loss the config object follow the...

How to view a cakephp plugin page

I'm making a plugin called "test", as an example. Is it possible to create "pages" for this plugin and display them? In my plugin folder I've got a folder called View, and inside that another folder called Pages, which contains a file: "demo5.ctp" +test view Pages demo5.ctp +webroot I'm assuming...

Why store the function on the element using data()?

I am trying to understand some code from the Swipebox plugin. There is a function declared. $.swipebox = function( elem, options ){ // plugin Jquery codes.. } Now this codes below I really do not understand. What is the main purpose of this code? Why does it save function to...

Tycho build error: “… requires bundle … but it could not be found”

We have an eclipse Luna plugin application which we're trying to build with Tycho. When we try to do a mvn clean verify, we're getting this type of message: [ERROR] Cannot resolve project dependencies: [ERROR] Software being installed: 1.0.0.qualifier [ERROR] Missing requirement: 1.0.0.qualifier requires 'bundle org.eclipse.core.runtime 3.7.0' but...

Jquery how clean formData object in my own upload plugin

I tried to create my own plugin for upload files via ajax. If the page where there is the input file is reloaded after upload It seems to work good. If the page where there is the input file is NOT reloaded after upload (because was reloaded only ajax content)...

Node js plugin permissions

I create a web server with Sails.js, and want to allow third dev to create node.js plugins installable from a web page (store). My problem is I don't want this plugin to require sails (or other critical modules) and have access to database and services and do what they want....

Fluentd parser plugin

I am trying to implement a parser plugin for fluentd. Below are the configuration file and the plugin file. Fluentd config file. <source> type syslog port 9010 bind x.x.x.x tag flog format flog_message </source> Plugin file module Fluent class TextParser class ElogParser < Parser Plugin.register_parser("flog_message", self) config_param :delimiter, :string, :default...

File is being made but FileConfiguration is not putting text in it

I'm trying to make a Bukkit/Spigot plugin which stores user data with YML files, and I can't make a list in file that gets created when the users joins. I'm using the built in parser. The Code: @EventHandler public void onPlayerJoin(PlayerJoinEvent e) { Player p = e.getPlayer(); File f; f...

How to specify SonarQube rule description as a markdown/html resource file instead of using annotation?

I have my custom rule, let's say with AEM-1 key. So, as it is done here, I make my AEM-1.html resource file with some simple html content and it does not get's picked up by SonarQube 5.1. It refuses to start, because no description is provided for the rule. I...

How do I access general eclipse preferences in my own plugin

I want to get value of general console properties in my plugin. How can I do that? I think I should do something like this: IPreferenceStore store = ScriptUIActivator.getDefault().getPreferenceStore(); store.getDefaultInt(preferenceName); But what is "preferenseName"? And which one preference store do I have to use.

Fancytree: Configure my own keyboard navigation

I would like to know if there is a way to expand on the navigation that Fancytree offers, for instance, force the delete, cut, copy or paste methods from my contextMenu to occur when I press Delete, ctrl+x, ctrl+c or ctrl+v on my keyboard. I've been studying and using fancytree...

Display artifact in Jenkins Build description

I would like to automatically display a artifact as part of the build description. Now I can do this by manually editing the build description but that would mean I have to do this for every build. Is there a way to automate this? This is what I would like...

How to use variables in option parameters for a plugin (like fullpage.js)?

I've been looking for hours to find the answer of my problem, but could'nt find anything usefull. I'm using the fullpage.js plugin, one of the various option is "anchors". I'd like to use this one but I'll never know the link's names that I've to put in it. They can...

Django settings

In my project (based on Django) I need a custom option in order to switch on/off some functionality in my view. if (FLAG): ..... else: ..... As I know, if I set this variable in I wouldn't have imported it from, because is not a module and...

Import jQuery Plugin with JSPM

I'm trying to import the jQuery plugin jQuery.scrollTo with JSPM. So far I installed it with jspm install npm:jquery.scrollto and now I'm trying to import it with import $ from 'jquery'; import scrollTo from 'jquery.scrollto'; Now I'm only getting $(...).scrollTo is not a function errors. I tried to shim it,...

Fancytree: implementing bootstrap skin

I currently have a working fancytree that is using the Windows 7 skin css, but the rest of my application is based on the Bootstrap style. I am having trouble implementing the bootstrap skin to Fancytree. When I do (by replacing my win7 css file with the Bootstrap css file)...