FlexBuilder: Can it refactor at the package level? Am I doing something wrong? - apache-flex

I know that FlexBuiler's refactoring engine can deal with updating variable names… But I can't figure out if it's possible to refactor at the package level.
For example, I want to move foo/a.as to foo/bar/a.as, and I want the package path to be updated (ie, from package foo to package foo.bar) and references to be updated accordingly.
Does FlexBuilder support this sort of refactoring? Or am I just doing something wrong?

No, it does not. Sorry. Your only option is to follow that with Ctrl-H, and swap out foo. with foo.bar.

The upcoming Flash Builder 4 will support Move refactoring to move a class into a different package. A public beta is available on Adobe Labs.

Related

How to manage legacy dependencies in a R package?

I'm working on a fork of a package that depends upon the ReporteRs library.
However, this library has been deprecated by its owner for a few years, in favour of the officer and flextable libraries.
On of the main reasons for this depreciation is not to depend on rJava, which may cause installation problems and bugs.
In my package, how should I manage this case?
So far, my package was processing data to return a ReporteRs object. If I change my functions to return an officer object I would break backward compatibilty.
But if I don't, and keep old, ReporteRs returning function as legacy backward compatibilty functions, I have to keep ReporteRs in my dependencies and my package would be rJava-dependant.
Is there a win-win solution?
Here is what I would do:
Make your best attempt to re-implement your functions with the officer library, but keeping your old API. Make sure that you warn the users that these functions are deprecated. At the same time make new functions fully compliant with officer/flextable syntax. Note that you might change the behavior of the functions slightly (as in, not ensuring all parameters are properly evaluated), as long as they take the same parameters and return the same type of objects.
If that is really not possible, just add a compatibility warning to your old functions.
Create a transitional package version that you would keep around for a few weeks or months with both versions of these functions. If the package still needs to depend on rJava, tough luck.
Keep track of the packages that depend on your package. If there are not too many, you can contact their developers directly. Maybe the issue is not as serious as you think it is?
EDIT: As discussed above, you can make your dependency on ReportR conditional on the availability of ReportR. Then, you can put ReportR into the Suggests field of the DESCRIPTION file rather than Depends, and in the package you can use code like this:
if(requireNamespace("ReportR")) {
warning("This function is deprecated, better use MyNewFunction instead")
ReportR::whatever() ...
} else {
warning("To run this (deprecated) function, please install the ReportR package")
}

Control over OpenAPI 3.0 package generation for jersey-jaxrs

I'm using openapi-generator for jersey-jaxrs (OpenAPI 3.0). I'd like to control the package where my code is being generated.
I'm setting the api-package, model-package, package-name, and invoker-package options, all to a xxx.yyy.zzz value.
My problem is that most of the code is generated under gen.xxx.yyy.zzz, and it's not discoverable by the part of the code generated under xxx.yyy.zzz. Implicitly, gen is prepended to the package name. I understand this is convenient in many cases, but not mine. Is there any generator option to avoid this?
I've learned a bit about the Mustache templates and they seem like a possible solution, but maybe a bit too much for my requirements.
Ultimately, I can move the code in gen to the other (non-gen) package manually, and it works, but this is quite inconvenient.
Finally, I found out that you can mark folders in IntelliJ IDEA as "generated sources root", which makes it discoverable to the rest of the project's code.
This doesn't solve my question, but it does solve the problem that originated the question.

Why my wrapped meteor package isn't working?

I seek a little help to wrap a package for meteor. It has always been my weakness on this framework. I know it is not difficult, I read tutorials and some articles like :
https://www.discovermeteor.com/blog/wrapping-npm-packages/
http://www.meteorpedia.com/read/Packaging_existing_Libraries
However I get lost in export and stuff, and it is time to understand !
I tried to wrap this package :
https://github.com/fians/Waves
(I knew one day I was going to not find the package already made by someone on atmosphere :()
So I wanted to do the thnings right, following guidelines made by dandv. I forked the repo, add the meteor packages with the files : export.js and package.js. Following the example of moment As you can see here :
https://github.com/Voyag3r/Waves
Finally, in my app, I created the local package folder with the meteor command : meteor create --package voyag3r:waves I tried to called the waves variable, bit it is not defined. I tried with and without a capital letter. (like in the source code waves.js). No, I tried with this.Waves instead of just Waves in export.js, neither.
There is something I do not understand with namespace and visibility I think, and errors are not displaying useful information this time. Is there someone to explain to me ? Because I would like to do a lot of other packages !
Thanks !
Glad to see that you read through those documents above, as they're quite helpful. However, I understand that it can be confusing to work through the details. Hopefully, I can assist you.
I recently finished packaging up a couple of libraries for Meteor, so you should take a look at those repositories as examples:
jspdf:core
jspdf:autotable
More specifically, take a look at the jspdf:core repository above and inspect the meteor-pre.js and meteor-post.js files for how to handle exporting variables:
meteor-pre.js
var window = {};
meteor-post.js
jsPDF = window.jsPDF;
Other important files include package.js and package.json, and of course autopublish.json, for integrating version updates with http://autopublish.meteor.com/, a fantastic tool written by Luca Mussi #splendido.
Additionally, I would recommend that you review the Official Meteor integration directly from 3rd party libraries discussion and ask #splendido or #dandv for assistance with reserving the namespace for this library.
This process has gone through rapid change over the last few months, and although not perfect, it's improving steadily. I'm encouraged to see that, like me, you want to assist the Meteor ecosystem.

Famous-Angular with Meteor

Is there a way to use Famous-Angular with Meteor.js? I have tried to add the ngMeteor package with Famono and the bower package with famous-angular in the smart.json.
Have a look at the famous-views. http://famous-views.meteor.com
There seems to be some work done for an older release of meteor. Check out
https://github.com/Splendsome/meteor-famous-angular
Check out angular-meteor a great integration between those two amazing frameworks
And look at this boilerplate (very early WIP) that is using angular-meteor
why would you want to? That's like asking "how to use meteor with SOAP?" - you don't need to.
meteor includes a much simpler to use reactive UI (blaze) that obviates angular.
look at the famono package for meteor to get those two cooking together.
look beyond the buzzwords to figure out what you actually need to do.

Avalonedit Show syntax error

when I develop a custom language IDE using avalonedit, I encountered a problem. I use regex to check the syntax, and it works as designed. However, I want to show the syntax error with wave text mark. I did search at google, yet the solution is either outdated or not feasible. Any ideas? Thanks ahead.
AvalonEdit does not have this functionality built-in. However it provides all the infrastructure needed to implement it yourself. In the SharpDevelop IDE we have an implementation that should suit your needs.
You'll need some of the code from the SharpDevelop repository (https://github.com/icsharpcode/SharpDevelop/):
TextMarkerService, TextMarker
and its related interfaces and enums.
To make it easier for you, I have created a small sample application:
https://github.com/siegfriedpammer/AvalonEditSamples/tree/master/TextMarkerSample
It uses the AvalonEdit 5 nuget package and contains the classes mentioned above, plus a WPF Window to test it.

Resources