How to declare global lists in Eclipse RCP - plugins

I have some data stored in 5 lists. I need to acces these lists through all rcp project. The problem is that I can't refer to a static variable in the content provider where these lists are created.
I don't know also how to make variables global without calling them like ClassName.VariableName .
Can you help me with a solution for these problems ?
Thank you !
P.S. For admins, please read the questions before marking them as duplicate, I have searched the topic on stackoverflow and none of the questions already here can help me solve this

Related

Markup items in other files on xcode?

Hi, guys.
I'm using Xcode to continue an existing app and I know the best way to document this specific project is through markups (/// instead of //). Problem is: There are too many functions and using markups to explain all of them would make the code difficult to visualize. Instead, I really want to markup variables, functions, methods and so on... but in other files if it's possible.
Can I markup a function declared in another ".swift" file, somehow? How? I realized my code would improve a lot with those markups to my co-workers, but I've got to really emphasize how illegible the files that variables/functions are declared could become.
PS: StackOverflow's newbie here. If anything goes different than our community's guidelines, please let me know.
Thanks in advance! ;)

Sightly syntax to retrieve crx/de properties in jsp/html page

I would like to retrieve some properties e.g. jcr:created using Sightly or any related syntax for the panel component in AEM adaptive forms. 1
The previous Sighlty syntaxes that I have attempted to retrieve the crx/de properties include:
${properties.jcr:created}
${pageProperties\[jcr:created\].getTime.toString}
${guidePanel.jcr:created}
${resource.jcr:created}]
I have tried the following syntaxes but unable to retrieve the value from the property and in worst cases, the component may not be rendered on screen.
I have looked up on Adobe forum sites and past stackoverflow questions that other people may have asked. I have tried the solutions and given answers but was unable to achieve the result. I would greatly appreciate for any help or sharing of applicable knowledge if you have encountered similar issues or previously attempted to solve similar problems. Thank you!
You can always create Use class in Java or Javascript to access these properties, it's cleaner and testable. Better than that, you can use Sling Models which are more readable and easier to implement, here is a good presentation about it https://www.slideshare.net/accunitysoft/understanding-sling-models-in-aem
Properties of resources are readable without any extra definitions needed.
So you might want to check what resource is handled in your component by adding this:
${resource.path}
Then you can check the returned path in CRXDE if there really is a jcr:created property available at this path - which should be the case if you are accessing a resource that has a proper sling resource type. Then this call should give a valid return value:
${resource.path} ___ created:
${properties.jcr:created.getTime.toString}
If the path is not displayed as well, then it would help if you could post
the repo path of the content resource you are processing
the sling:resourceType
the path to the component's ht(m)l file that you are using

Share data between views (ViewPart) Equinox

got a little question here to Eclipse Plugins.
I have a java class which contains some data, e.g. a linkedlist and some other stuff.
I need this data in 2 views. In one view I want to display some of them, and the other view should show a list with the data. (this is my special case, but I ask the question generally).
So, how can I use this one class in both views? In "normal" java I'd would give a reference when I create the views, but as far as I know this is not possible in eclipse plugins.
My solution is, that the data-class is a singleton. But I don't like this solution, I think this only works in my case.
Hope you got the point :) Do anyone of you know a better solution?
(i'm new in eclipse plugins, there aren't good books or tutorials, aren't there?)
To answer the second question in your post... try this site out for basic tutorials about Eclipse plug-ins and RCP applications.
www.vogella.com/eclipse.html
This answer should help with the first question in your post.
In SWT, all views just show a presentation of the underlying business objects. So when you implement the list and the tree, they just need to have the identical object as input (e.g. when calling treeViewer.setInput(theSharedDataObject)).
Your data class doesn't need to be a singleton for that, you just have to point to the same instance of the data.

Checking for empty radio buttons in Perl

I new to Perl and had a question. I have a simple page which allows users to respond to survey questions. There are various question and each has 4 choices. My question is that how do I verify that the user has answered all the question. The radio-group names are populate from the database using an incremental id which is what's confusing me. So say question's choices have the radio-group name "1" and another questions radio-group name is maybe "4". I'm not using the CGI.pm module. Any help will be appreciated. Thank you.
Add a hidden field with a list of question identifiers.
It is generally a bad idea to trust the client for a list of questions.
Just reuse the code you implemented to display the survey. You'll know how you generated the names of the form input fields. Then cycle through all these names and check whether you have a respective HTTP POST field.
For any further questions you need to supply more detailed information on what is your problem.

Trouble Configuring a .plist for an iPhone App

I am new to iphone development and I could use a little help in setting up my .plist file. I seem to be confused as to how to actually set it up. I have an app that will have a Frequently Asked Question (FAQ) page or view. As of right now, I am putting the questions in a property List file (.plist) configured like this: http://img16.yfrog.com/img16/6225/picture1zrf.png
I am not sure where to use a dictionary type or an array type. There are a lot of FAQs and would like to have them searched and indexed. As of now there are 8 groups of FAQs and each group of FAQs can have several sections and under each section, the actual questions and its answers are provided. Am I on the right track with this? Please help. Any help is welcomed.
It would seem you are on the right track. In general an array is a sequence of items (each value has a corresponding index used for lookup), where a dictionary is an associative container (each value has a corresponding key used for lookup).
The one thing I would change, however, is to make the keys for the faq dictionaries be a little simpler to index. You have the questions in the faq's dictionaries already so the key itself does not need to contain it. Instead it would appear the faq id would be a good value to use as a key.