Importing Custom Blocks in Scratch/BYOB/SNAP - mit-scratch

I have created a bunch of custom blocks in SNAP/BYOB Editor and now want to share them.
I cant seem to find any ready references to this, is there is a way to do it?

Snap lets you export global custom blocks from the project menu's entry named "export blocks". That opens a dialog box letting you select which blocks to export as a library. If you're unsure about dependencies among blocks export all of them (default). Libraries are saved to your download folder in an xml format. You can import blocks libraries into other projects either via the project menu's "import" item, or simply by dragging the library (xml) file into the browser with the target project.

Related

How to group up commonly accessed files in a Project, and then show them in a simple fast accessible folder?

When you are working with a project, you often need to click many times in the Tree view & search for files in different locations, just to get the desire files opened.
Is there a way to let some commonly accessed files directly shown under the root of the Project (or group them up in a simple fast accessible folder)?
eg: like creating virtual Links to those files under the root of the Project. (or other solutions).
This is what I am doing right now:
the problem is::
manually creating the links in Windows are really time consuming. You can't just right click in Eclipse to create them.
when you open them, they will be opened with Default Editor -- which treats them as Text file not link file.
you can open it with System Editor, but that
requires you to set all these file to be opened by Eclipse.exe in your operating system.
maybe its fine for .java file, but for all other files (eg: .xml, .html) is probably not good.
you have to right click to open it everytime
the icons in the tree view becomes just a Text file icon.

QA plugin for intellij

I am trying to load my customized checkstyle configuration xml in the QA Plug in for IntelliJ.
The following is the graphic interface that I get in order to configure it:
In the label "Jar file", what am I supposed to upload? What kind of jar are they talking about? I have only the checkstyle xml configuration file.
If you just want to use Checkstyle I would recommend to use CheckStyle-IDEA instead. Its included version of Checkstyle is much more up to date then the one provided by QAPlug.
Regarding your question, I think the dialog you presented is to add additional Checkstlye checks, e.g. sevntu-checkstyle. If you would like to have such additional checks then you would need to add a configuration and a jar file with the checks.
To import your checkstyle.xml try as described in import and export analysis profiles on the QAPlug homepage. There it says "You are able to import several coding rules configuration files (eg. Checkstyle, PMD, FindBugs) to one profile simply be repeating import action."
First, save your desired configuration xml file somewhere locally on your computer.
Right-Click/Ctrl-click on the file or directory you want analyzed with QAplug and click "Analyze Code". This should bring up an interface saying "Specify Analysis Scope"
Under the "Analysis Profile" heading, tick the Run with Chose Profile button. Then click on the ... box to search for the proper directory.
This brings up another window titled Coding Rules. Click the + button that pops up and select either project profile or ide profile according to taste.
This brings up yet another window titled New Profile. Name your profile appropriately. Tick the import profile button and then it will allow you to import profile from and point it at the .xml file you saved in #1. Hit Ok.
Now under the analysis profile, you should be able to choose the newly created profile. Click OK and you're good to go.

XPages: add a ResourceBundle Editor to the Domino Designer/Eclipse

I found this properties editor that seems perfect, I have a lot of translations to maintain. I found this editor that seems to be able to handle all languages at the same time, which is perfect for me: https://github.com/essiembre/eclipse-rbe
I managed to install the plugin, but now I have to confess that I'm way out of my league. Stumbling around in the dark...
How to start it, how to use it?
Or is there a better way to maintain properties in multiple languages?
I also have to maintain an application with a multi language user interface.
First of all I also started the attempt to use eclipse plugins for editing Java resource bundles but I am also failed... :(
After some test's with different editors I decided to work with JLokalize.
My way of proceeding:
Step (Switch to the package explorer of your Domino Designer)
Step (Select a folder for export to file system, e.g. Custom Controls or XPages)
Step (Set filter types to *.properties)
Step (Finish the export to your filesystem (or a network file share, if someone else should do the translation work))
Open and edit the resource files with JLokalize
After finishing your translation work you could import the translated files (e.g. *_en.properties for files translated to english) in your application.

eclipse plugin import customized project

I have an eclipse plugin which defines a customized project type. While creating files in the project, it creates also some extra files as "hidden resources". Everything works fine when I create a new project and add/remove files in it. The extra files are not shown in the project tree, just as I wished.
Now the problem is: if I remove this project from workspace, keep the content, and import it again using standard import, all the hidden resources are no longer hidden. Seems this "hidden" property of these files are gone, although I thought they should be stored somehow in the project folder.
So could anyone give me a hint if I need to implement a customized import to set the hidden resources hidden again? or what is missing? Couldn't find an answer with google. Honestly I don't even know if this is doable, because if I import a maven project, I can see the .project and .classpath are also shown, although they are hidden while creating a project.
In case other people have the same question: this can be done with a IResourceChangeListener. E.g.
IResourceChangeListener listener = new MyResourceChangeReporter();
ResourcesPlugin.getWorkspace().addResourceChangeListener(listener,IResourceChangeEvent.POST_CHANGE);

How to debug Eclipse source code

I am having tough time to figure out debugging UI parts of Eclipse. I couldn't find any information on google (or) Eclipse web site.
All I wanted to do is to find out the code that gets executed when we double-click a file in project explorer to open the file in Editor.
I tried to bring up Eclipse source code from Plug-ins view -> right click on the plugins -> import as Source Project. But, I am unsure what are all the components that constitutes to the UI part. I get some weird errors when I try to import everything that's found in plug-ins view.
Where can I find the information related to debugging Eclipse source code?
Instead of using Plug-ins->Import as Source Project, I would recommend opening the Plug-ins view, selecting all plug-ins, right click, and Add to Java Search.
Then you can use Open Type Ctrl-Shift-t to search for class names and the source will be attached so you can read it, set breakpoints, and debug.
In your case, I think you want to investigate IWorkbench, IWorkbenchWindow, and IWorkbenchPage. The openEditor(*) methods on IWorkbenchPage will be of particular interest.
You may also want to take a look at the org.eclipse.ui.editors and org.eclipse.core.contenttype.contentTypes extension points.