Edit portlet (xhtml part) without deploy - xhtml

I have a question concerning portlet 'hot-edition'. I wish I could change some code lines in an xhtml file and see that changes when I refresh the LR 6.1 site. Im developing portlets with 6.1 version + Primefaces 3.2.
In some cases I can change something and see the changes, but when I get a faces error, is like everything is blocked and I have to re-deploy the portlet compiling and generating the war again. So, lot of time lost on this process.
Anyone knows how to fix that?
Thanks in advance.

Are you using Liferay IDE with eclipse for development?
If yes, then, you can add the plugin portlet project to the server and whenever you do some changes to any file within the project just right-click and say publish and your changes will be reflected.
Or else you can also configure for auto-publish if any changes happen to the projects added to the server.
Hope this helps.

Related

Asp.Net Core 1.0 (aka Asp.Net 5) website refresh with any file change?

Looking for a similar functionality like browsersync give for Node applications to auto reload browser with any file change.
Running Asp.Net Core (aka Asp.net 5) with dnx-watch and it restarts the Kestrel web server with any C# code change, but still have to refresh browser manually to see the changes whether its client or server file changes. Using Gulp for build pipeline and thinking of using it to do both dnx-watch and reload browser, but cannot find any example online.
Love to have some help on this.
Thanks
There's no official support for your scenario, sorry!
However, it's interesting and I would like to have it at least on the backlog. Can you please open a request at https://github.com/aspnet/dotnet-watch ?
1) It is possible to just use gulp and browsersync. It works good and fast, but is a bit tricky because you have to start IIS-Express first and use browsersync in proxymode.
2) A much better solution is the Visual Studio Extension Browser Reload on Save made by Mads Kristensen, a member of the Asp.Net team.

Turning off Spring Roo in STS, but still use from command line

From time to time STS seems to bog down or free while working in a Spring Root webapp. It can sometimes be ten or twenty minutes before the UI allows you to really do anything, other than go slow and queue up actions.
We've traced all the the postings/bug reports about "JPA change handler (waiting)" messages and AspectJ issues - but no real permanent solution appears. Sometimes when we upgrade Eclipse or Roo things get better for a while.
We are hoping to figure out if this is really a Roo problem or more of an a Spring/AspectJ issue.
Question: Is it possible to disable Roo in the IDE but still have it build and work OK in the IDE, just not Roo smarts going on?
I thought I just had to remove the "Roo Nature" for the project but that does not seem to completely do it - the Roo Shell keeps popping open when I do a Maven Update.
If not we'll probably look at the push-in refactoring route - but that seem to really be a one-way street.
Our webapp has about 20 domain objects and 30 controllers - it's not tiny but not huge either. We use JPA/Hibernate too.
Thank you - Richard
We ran into the same problem. It seems the JPA Daly support for Eclipse, included in the WTP, generates of a lot of JPA Event Change notifications while compiling a project. It seems in projects with aspects, like the Roo ones, this behavior is even worse and makes using the IDE very slow and even hangs sometimes.
As there is not any way to disable it through configuration, you have to remove or move the related files. Ex:
Go to the STS/Eclipse installation folder.
Run the following command::
rm -rf plugins/org.eclipse.jpt. features/org.eclipse.jpt.**
We found also another problem with the Eclipse AspectJ plugin (https://issuetracker.springsource.com/browse/STS-4037) that caused to compile all the project on each modification to any Java class in the project with Aspects applied. It is solved in the recent STS versions, but check it just in case by performing the following steps:
Go to the Project > Properties > AspectJ Compiler menu.
Check the Other > Outxml configuration property is disabled.

PHPStorm - Link external SFTP-folders into project

the issue i am fighting through is a bit complicated. Ill explain the setup envoironment to you first.
I am using PHPStorm to work on a Symony2 Project.
My Apache is hosted on a Debian-VM connected to PHPStorm via "Deployment Tool".
/* So far: I can edit code and update the server automaticaly on save. Works*/
My problem now is, that i am using the composer, which is ment do get me the right bundles into the vendor folder.
I WANT to create kind of a symlink from the server directly into the project.
I DONT WANT to download the vendor folder from the server hard into the project.
COMPACT:
I want to create a symbolic link within a PHPStorm project. Linking a folder from a server into the Project. The linked in folder should be unidirectional updated on source change. The Classes and Namespaces should be known to the Project.
Is there any native way to get this done?
Or does anyone know a plugin which could handle such affairs?
I hope i expressed my point clearly :/ Please ask, if anything is unclear.
Greetings and thanks upfront.
It's not possible to do directly from PhpStorm, see the related issue. You can use some third-party tool like ExpanDrive to map a server directory to the drive letter by SFTP and then add this local directory as a content root to your PhpStorm project. Note that it may affect the performance dramatically.

After MVC3 publish, just update the views

.NET/MVC3 newbie, so please bear with me!
I've searched for this answer all over but cant find exactly what im looking for, so here it comes...
Lets say that i'm developing an MVC3 app with Visual Web Developer Express and i go about deploying the site using the built in publishing tool.
But now that my site is up and running i find that i need to make a minor adjustment in one of the views. I update the view and save the file, and use my FTP program to upload the new file.
The problem is that MVC3/.NET doesn't seem to refresh/change the view, because it's still using the old version.
Of course I have tried refreshing (in many different browsers even), but it still won't load the new view.
Is this normal behaviour, meaning that i have to publish every time i make some minor adjustments (kinda time consuming)? I really can't imagine that this is the case, so i'm wondering if you could shed some light over this?
Appreciate any replies!
/Mikael
If you upload the view (.cshtml) file and that is the ONLY part of the application that has changed, a refresh will reflect the change - you may have to ctrl+f5 to clear the temp cache. However! If you change ANY of the controller code or action code, or any c# (or vb if thats what you use), then you MUST re-upload the compiled .dll associated with the entire application in order for the changes to be reflected.

Edit source code when debugging

I have VS2005 and I am currently trying to debug an ASP.net web application. I want to change some code around in the code behind file, but every time I stop at a break point and try to edit something I get the following error message: "Changes are not allowed when the debugger has been attached to an already running process or the code being debugged is optimized."
I'm pretty sure I have all the "Edit and Continue" options enabled. Any suggestions?
This may seem counter-intuitive, but turn edit and continue off.
There might be another "allow me to edit read-only files" or "allow me to edit even when I am debugging...no really!" setting somewhere, but I don't have 2005 to look at to check.
In 2008, turn off edit and continue and you can edit while it's running (but those changes aren't appplied.)
If you actually want to use edit and continue, you also have to enable it for the project, on the web tab of the project settings.
The application is actually running off of a compiled version of your code. If you modify it it will have to recompile it in order for your changes to work, which means that it will need to swap out the running version for the new compiled version. This is a pretty hard problem - which is why I think Microsoft has made it impossible to do. It's more to protect you from THINKING some changes were made when they really weren't.
For Asp.net it is possible to think of two types of 'edit and continue'.
One is a classic edit and refresh the browser. This works because the browser refresh recompiles everything except precompiled code behind files. This is not referred to as Edit and Continue, though in practice it provides a similar effect. In this mode you cannot change code behind files, because they were precompiled and deployed, but you can change just about anything else.
Another mode allows you to change precompiled code behind files but nothing else ... (this is the mode Chris Bilson mentions which needs to be set on the project properties for ASP.Net). In this case you are using the Edit and Continue feature of the debugger, which knows preciously little about ASP.net. The debugger just sees a loaded .Net assembly and can modify it when stopped in the debugger because there is a project in the solution that claims to know how to build it. In this case you are prevented from modifying things that would otherwise mess up the debugging session. This method however is the only way to change the code while it is running rather than requiring a browser refresh.
You are allowed to make changes to the *.aspx file while it runs, and you can hit refresh on your web instance to see those changes immediately. However, you cannot make changes to the *.cs/*.vb or *.designer.cs/*.designer.vb files while the program runs.
I search for this on Visual Studio 2008 WAP (Web Application Project) and it took me two days to find the solution, so here it is in the hopes it helps somebody else:
There are two locations that have to be checked, one it under tools-options-debugging-Edit And Continue-Enable Edit And Continue, the other is right click project-properties-Web-Enable Edit And Continue
For the record, I had a similar problem with VS 2008 and a different solution resolved the problem for me. Editing code in Visual Studio 2008 in debug mode
Check that you are not in release mode.
In release mode you cannot edit your code while debugging. Just change mode to Debug

Resources