The CN1 Intellij Plugin is suddenly disabled on old project. Is it safe to delete an old ~/cn1Settngs/CN1Properties to fix this? - codenameone

Strange issue I'm having and I want to know what to do to fix it without compromising project integrity.
I have a CN1 project in Intellij (v 2017.1.4) that I started a long time ago. The other day I started a new CN1 project to try out something new. It pulled down the latest CN1 libs (the properties file says version 174 is the libVersion) and worked fine for testing.
Now I open my original project and the CodenameOne functions are all greyed out (projectLibs version in the properties file is 159). The icon on the context menu and menu-bar are greyed out. The plugin is up to date (3.7.2). I see no messages or errors in the IntelliJ "messages" section.
I am assuming that the new project and libs re-wrote something common to both projects and now the old project can't even start the plugin to let it pull down new libs... In experimenting, I went to my home directory ~/.cn1Settings and renamed the "CN1Preferences" file so that the project would have to create a new one. When I opened the project it DID create a new one and the plugin was working.
So here's the big question: If I abandon my old CN1Preferences file, what settings/customizations in that file am I walking away from and will I need to make sure I set correctly again to ensure my project works as it should and doesn't have any hard to debug issues?

This is probably an issue of keeping two windows concurrently, try closing both projects and opening only one at a time. There is an issue with detecting the correct project in the IntelliJ/IDEA plugin

Related

Wix Setup Editor Root Element Missing

Using wix setup editor / Wix toolset latest build and Wax.
I managed to create my setup project just fine on Friday. However, going back to it today and trying to load the setup editor I am met with this message.
I have tried to navigate to the file path it shows however, such a file does not exist.
I have tried reinstalling all three components to no avail.
Quite stumped here, does anybody know why this would suddenly happen upon re-opening VS a few days later?

Guibuilder right menu option not available

Using Eclipse Photon and the newest version of the Codename One plugin, I have an issue where I create a new project and then create a GuiBuilder form inside that project, but when right clicking on that form I do not see any of the Codename One specific options I should be seeing, like the Guibuilder option. So I can't open the form in the Guibuilder.
This is happening in a 36 seat computer lab, but not on my office machine. Any ideas what might be going wrong in the lab?
If anyone else has this same issue, as Shai suggested, it had to do with where the Eclipse workspace was located. In my case I had it on the lab desktop.
There were spaces in the path, but even removing those did not solve the problem if the workspace was on the desktop. When I moved the workspace to the user folder, all started working as I would expect it to work.
There might be an issue with the length of the workspace path, along with special characters. Regardless, relocating the workspace to c:\users\win10\workspace solved the issue for the lab computers.

Resource loading error for older netbean project

I have a project that was last run earlier this year. I've installed latest netbean with plugin but get the following when I start the app.
java.io.UTFDataFormatException: malformed input around byte 200
at java.io.DataInputStream.readUTF(DataInputStream.java:656)
at java.io.DataInputStream.readUTF(DataInputStream.java:564)
at com.codename1.ui.util.Resources.loadTheme(Resources.java:1270)
at com.codename1.ui.util.Resources.openFileImpl(Resources.java:303)
at com.codename1.ui.util.Resources.openFile(Resources.java:269)
at com.codename1.ui.util.Resources.<init>(Resources.java:189)
at com.codename1.ui.util.Resources.open(Resources.java:768)
at com.codename1.ui.util.Resources.open(Resources.java:688)
at com.codename1.impl.javase.JavaSEPort$4.run(JavaSEPort.java:1720)
at com.codename1.ui.Display.processSerialCalls(Display.java:1056)
at com.codename1.ui.Display.mainEDTLoop(Display.java:873)
at com.codename1.ui.RunnableWrapper.run(RunnableWrapper.java:120)
at com.codename1.impl.CodenameOneThread.run(CodenameOneThread.java:176)
I did create a sample app that worked and noticed that the properties tab shows it as a Gui Builder Project. My older project does not show this. I have tried comparing the properties but I do not see what is determining this.
I also copied the theme and the sample code into my project, used that as the main class. The problem still persists.
Any help would be appreciated.
Thank you
Sam
We updated the format of the resource files so newer skin updates might collide with this project. If you use Update Client Libs it should work fine.
However, this change might also cause issues with newer skins if you are using versioned builds. Since the skin includes the native device theme within and we updated the theme file builtin the skin. You can understand our motivation for this change by looking at the before/after screenshots in our 3.8 release announcement.
As a workaround for that problem you can switch a skin and download an older version of a device skin from our skins project. You can then add that skin manually and use that.

Silverlight out of browser application cannot start

If I enable the Out of Browser application setting, the application doesn't run, doesn't even debug. Visual Studio compiles the app, switches to Debug layout but ends immediately.
Any ideas?
Created a new Silverlight project and moved all the files to the new one. Now it works without problems. I have no explanation for this but it worked!
Have you done steps mentioned in these 2 links?
http://johnpapa.net/10-steps-to-debug-silverlight-out-of-browser-applications-without-attaching
http://indiandotnet.wordpress.com/2011/01/10/silverlight-out-of-browser-application-oob-apps-in-simple-steps/
For anyone else coming across this problem, I also just had this occur. I followed Elodie's suggestion and created a new project and doing folder comparisons. Eventually it came down to an InBrowserSettings xml file. It was fixed by manually editing the .csproj file to remove the reference to that file and then deleting it from the Properties folder.

SIlverlight XAP file not refreshing when debugging application

I work on a team building Silverlight apps (version 4). We use SVN and all work on separate parts of the code, and regularly update the project with latest code. The Silverlight app runs from an ASP.NET web app. We are having very frustrating issues when updating our code. It seems like old versions of the XAP are being cached.
Example: Francisco changes the wording of a popup dialog, and commits his changes. A very simple change, what could possibly go wrong? I get the latest code. I see the new code in my IDE (VS2010), and run it. When I view that dialog, it does not have the new wording, even though I can see the new wording in my files. I put a breakpoint on the code right where the change is, but when I run the app, the breakpoint is disabled!
I try Clean build of the Silverlight and the Web host. I kill my local ASP.NET development server. I run the app - same thing! I delete the xap from ClientBin. No good.
Each of us on the team are experiencing this issue. Now we occasionally solve it, but are never sure what exactly fixed things, which is not satisfactory.
There must be some setting or something that we are missing. You would think that deleting the ClientBin xap file would solve it, as the new XAP must come from compiling the Silverlight app, right?
If you've seen this problem before and have a real solution, please let me know. (The solution of "format your hard drive and re-install everything" will NOT be accepted!)
Thank you,
Daniel Wiliams
I recommend that you use IE for Silverlight development. See also this answer.
The problem with using Firefox for development is that Firefox runs plugins in a separate process (plugin-container.exe). When launching the debugger, VS doesn't know that Silverlight won't be running from the process it launched, so it doesn't attach to the correct process. The breakpoints in Silverlight code appear not to work because the VS debugger hasn't attached to any process running the Silverlight code.
I believe it's possible to disable the use of the plugin-container.exe process (see, for example, LIMPET235's post here), but that won't fix the apparent caching you're also experiencing.
I used to use Firefox for Silverlight development, but I found that things worked much more smoothly when I switched to using IE.
First of all, could you please check is your .xap file also included into source control?
it should not be included..., no need IMHO.
Most likely your xap file is set to read only.
go to that file location and make ClientBin folder not read only if is.
I've seen this before the XAP file is cached. Try emptying your browsers cache and then putting a query string on the XAP. So your XAP reference would look something like Foo.xap?1234
couple things to check.
Make sure your silverlight project's output path is correct.
Make sure your silverlight application has been added to your web app project.
Enable silverlight debugging in your web app project.
Set the silverlight project as a dependency in your web application's settings
The solution of "format your hard drive and re-install everything" will NOT be accepted!
Format your hard drive and install Linux (:
More to the point, configure the Silverlight Applications tab in the SomeSilverlightApp.Web project to copy the xap file from the SomeSilverlightApp project to the ClientBin folder which shows there by default.
The ClientBin folder is also part of the SomeSilverlightApp.Web project in my case and the xap properties are set to CopyToOutputDirectory: Always so that it also gets deployed.
This is probably not the right solution but it works here and I have not time to try to investigate this weird logic.

Resources