Is there any alternate feature similar to sling JSP recompile button in OSGI Felix console for HTL/Sightly components code refresh.?
http://host:port/system/console/slingjsp
AFAIK, I don't see any such kind of feature like one button click trigger to recompile options for the Sightly in AEM. but you can use Development Mode check box enabled in Apache Sling Scripting Sightly Engine Configuration at Felix console which results Sightly components recompilation at every request. have a look at sightly documentation for more information related to this. also from grepcode for SightlyEngineConfiguration
Related
I am converting some old Eclipse projects over to faceted form, and I'm uncertain which facets are appropriate for a JSP tag library (one Java class, one TLD file). "Dynamic Web Module" is overkill (generates a WebContent/WEB-INF and WebContent/META-INF, which are not needed for a tag library).
The web applications that use the tag library use Servlet Specification 3.1. The tag library conforms to web-jsptaglibrary_2_1.xsd.
Is the standard practice here to simply use the "Java" facet?
Is there no additional facet that is appropriate for JSP Tag libraries?
The screenshot shows my current configuration, which works but feels like it is missing a facet.
Eclipse Mars, Java 1.8.0_60, Tomcat 8.0.26
I think the comments have the answer to your question, I will try to
explain the same thing in a different way. Keeping the project facet just to java is enough.
Facets are just the aspects for your IDE to interpret the project related configurations well. To develop a JSP tag lib, all you need is Tag Library Descriptor youTag.tld and the compiled Java tag handler class files used in your tag library. Java project Facet is enough to provide you all the helps needed for writing the tag handler class.
Your only worry may be to package it as a jar in the right way, his is explained well in the below link.
Packaging the JSP Tag Library as JAR file is simple as per the
official guide.
I would like to use Postsharp and I'm trying to figure out if it is possible to disable/enable logging with PostSharp at run-time?
In my case, I apply the aspect in the assembly of the project, and compile my project with "Disable PostSharp for this configuration" in PostSharp tab equal to No.
Thanks,
Lev
PostSharp weaves in the logging aspects during build-time and you cannot remove this logging code during run-time.
The aspects usually send logging messages to the logging library of your choice (e.g. log4net, nlog). What you can do is to disable the output in that logging library during run-time.
You can find more info in the documentation of the particular logging library, for example:
http://logging.apache.org/log4net/release/manual/configuration.html
https://github.com/NLog/NLog/wiki/Configuration-file
I need to validate whether the imported packages of a bundle are fulfilled by a set of other bundles' export packages. This should not be very hard to implement but I know all the OSGi containers plus eclipse (when you do "validate bundles" in PDE) do this. I just don't know how to find that code. Does anyone know what classes/libraries I could use that already implement all this logic?
My goal is to give a list of files (bundles) in the file system and do an analysis whether the set of bundles is self-contained and if not to show all the missing external imports/requires. all this without actually having to run the bundles in a real container
You should look at the Resolver API in the OSGi spec. Apache Felix has a resolver implementation that is also used by the Equinox framework.
I am facing this weird requirement where I am supposed to create a web page using GWT widgets in an existing spring-maven web project but the corp security doesn't allow me to install any Eclipse plugins. I have the latest SDK but thats about it.
Is there any way to achieve this?
The Google Plugin for Eclipse (GPE), just like so many other Eclipse plugins, is not mandatory; it's just an aid.
But first, if “the corp security doesn't allow me to install any plugin” only means you're not allowed to use the Eclipse marketplace or contact update sites, it's worth mentionning that you can download the update site as a ZIP to be used locally: https://developers.google.com/eclipse/docs/install-from-zip
If that isn't allowed either, then let's look at the features provided by the GPE and how you can possibly do the same without the plugin:
Wizard for creating new projects: you're in a Maven project, so you're not concerned.
Running and debugging: you can do the same with a Java Application launcher. Choose com.google.gwt.dev.DevMode as the Main Class, add the com.google.gwt:gwt-dev JAR to the classpath (you can also add it as a dependency with scope provided, and ignore the warning printed by the gwt-maven-plugin) if needed, add your source folders to the classpath and pass the appropriate arguments.
Wizards: let's be honest, they won't boost your productivity that much.
GWT Compilation: you can do the same with a Java Application launcher. Choose the com.google.gwt.dev.Compiler as the Main Class, add gwt-dev and your source folders to the classpath and pass the appropriate arguments.
Editors: you'll lose the formatting and highlighting of JSNI methods, as well as reference checking of your JSNI references, the auto-complete in UiBinder, and validation of UiBinder and ClientBundle references. All those will be done only when you GWT-compile your project.
RPC: you'll lose the validation of your RPC interfaces and quick-fix to keep your sync and async interfaces in sync. Validation will be done only when you GWT-compile your project.
JUnit: you can do the same with a JUnit launcher: just make sure you add gwt-dev and your source folders to the classpath, and pass the appropriate options as a gwt.args system property (see “Passing Arguments to the Test Infrastructure” in the docs).
Nothing insurmountable.
I implemented an extension plugin for checkstyle.
Now I have the task to add quickfixes for some checkstyle errors in eclipse.
Example: Add a final modifier if a class is public.
After several hours of research, I decided to ask this question in several forums because I won't be the only one with this wish/problem.
According to the documentation of checkstyle http://checkstyle.sourceforge.net/, the plugin does not provide quickfixes for own implemented checks.
I did some research but I found nothing about how to add quickfixes for own checks.
Now the question: Is there a way to implement own quickfixes for eclipse?
I'm using version 5.6 of the checkstyle API and Eclipse 4.2.
Refer to Extending the eclipse-cs plugin page.
From there you can download a sample Check.
The file is here under the name net.sf.eclipsecs.sample
In src\net\sf\eclipsecs\sample\checks there is one QuickFix Java code and in base directory, in plugin.xml the following line is present, which enables the quickfix.
<!-- This plugin provides custom quickfixes for Checkstyle problems. -->
<extension
point="net.sf.eclipsecs.ui.checkstyleQuickfixProvider">
</extension>
You can download and refer that sample for your query. Extending Check is described nicely there.