Jump to content

IntelliJ plugin


derkork

Recommended Posts

Good morning,

 

I just wanted to install the PlasticSCM IntelliJ plugin on a mac, but it doesn't seem to be included in the MacPlastic installer. Could you maybe just make the plugin available on the global plugin repository (https://plugins.jetbrains.com/), where all the world is publishing plugins for IntelliJ ? That way everyone could easily install it through the IntelliJ IDE just like any other plugin and I guess it would also make some people aware of PlasticSCM. 

 

Until then, where can I get a copy of the IntelliJ plugin on the Mac?

 

Jan

Link to comment
Share on other sites

Hmm,

 

that didn't work so well:

Error:Plastic SCM detected the following error: Unable to communicate with Plastic SCM command line shell - Error running command line client on shell mode. The 'cm shell' command was launched but the process terminated abnormally.Warning:The Plugin is now working offline. You can still working normally but SCM operations will no be effective in the Plastic SCM server until you re-connect again. In order to re-connect, please go to Plastic SCM menu, and uncheck the option "work offline" once the server connection is restored.
 
When I run the cm shell command from the command line, it works so far:
 
$ cm shell
status
cs:3@rep:databuilder@repserver:xyz.de:8087

CommandResult 0

Is there a way to get some more info about what went wrong?

Link to comment
Share on other sites

Hi!

 

Some questions.

 

It's mac so do you have "cm" added to the PATH environment variable?

Is it available for all the users/GUI/CLI?

Are you running IDEA with your current user right? No root or something similar right?

 

Can you enable the cm log, test that it's able to log (you can change the output path inside the cm.log.conf file) and reproduce the issue, we can see if at least is launched. https://www.plasticscm.com/documentation/technical-articles/kb-enabling-logging-for-plastic-scm-part-i.html

Link to comment
Share on other sites

Hi Manu, yes i have added it to path variable. And I am running this with a normal user, not root. The same user was used for the shell and IntelliJ. I also set up the full path the in the plugin's settings in IntelliJ, just to make sure. I have attached my setup to this post. When I click the "test connection" button, i get this in the log:

2015-09-17 16:56:51,141 (null) j.thomae at (null) ERROR cm - Plastic client version: 5.4.16.689

2015-09-17 16:56:51,168 (null) j.thomae at (null) ERROR cm - Argument cannot be null.
Parameter name: path

Same happens when I enable version control for a project.

 

On a related note, the configuration of macplastic is really a mess on Macs. The config files reside somewhere deep in /Applications/macplastic.app and require root rights for them to change. As an additional nuisance they get overwritten when you update the application. MacPlastic should read the configuration files from $HOME/.plastic4 instead. 

post-27641-0-61000300-1442501358_thumb.jpg

Link to comment
Share on other sites

I'm sorry but I'm not even able to open the Plastic SCM preferences panel. I can see the "PlasticSCM" entry but when I click it nothing happens :( (I have to say the plugin is not supported for MacOS in the first place, sorry)

 

Can we try something different?

 

Please download the Plastic SCM client binaries (client.zip) from the MacOS download page https://www.plasticscm.com/download/5.4.16.691/macosx

Create a cm file, inside the client directory, having the following content and change the permissions to have +x.

 

/Library/Frameworks/Mono.framework/Versions/Current/bin/mono /Users/tardismac/Desktop/client/cm.exe $1

 

You will need to have the MonoFramework installed (http://www.mono-project.com/download/). And the "macplastic.app/Contents/MonoBundle/remoting.conf" file copied inside the client binaries directory.

 

Use this new "cm" tool for the IDEA test connection, please tell me if it goes further.

 

 

EDIT: Use this mono instead: http://download.mono-project.com/archive/3.0.3/macos-10-x86/

Link to comment
Share on other sites

 ps aux | grep mono
j.thomae        57124   0.0  0.1   729916  11236   ??  S     9:42AM   0:04.00 /Library/Frameworks/Mono.framework/Versions/Current/bin/mono /Users/j.thomae/devel/tools/plasticscm/cm.exe shell --defaultencoding --commfile=/Users/j.thomae/Library/Caches/IntelliJIdea15/tmp/cmshell5399200528490680672javaDotNet
j.thomae        57119   0.0  0.1   703464   9440   ??  S     9:42AM   0:00.53 /Library/Frameworks/Mono.framework/Versions/Current/bin/mono /Users/j.thomae/devel/tools/plasticscm/cm.exe shell --defaultencoding --commfile=/Users/j.thomae/Library/Caches/IntelliJIdea15/tmp/cmshell2722499935348091847javaDotNet
j.thomae        57114   0.0  0.1   703964   9064   ??  S     9:42AM   0:00.62 /Library/Frameworks/Mono.framework/Versions/Current/bin/mono /Users/j.thomae/devel/tools/plasticscm/cm.exe shell --defaultencoding --commfile=/Users/j.thomae/Library/Caches/IntelliJIdea15/tmp/cmshell8803805598739512565javaDotNet
j.thomae        57109   0.0  0.1   703964   9100   ??  S     9:42AM   0:00.51 /Library/Frameworks/Mono.framework/Versions/Current/bin/mono /Users/j.thomae/devel/tools/plasticscm/cm.exe shell --defaultencoding --commfile=/Users/j.thomae/Library/Caches/IntelliJIdea15/tmp/cmshell8886097833476942497javaDotNet
j.thomae        57104   0.0  0.1   703964   9116   ??  S     9:41AM   0:00.52 /Library/Frameworks/Mono.framework/Versions/Current/bin/mono /Users/j.thomae/devel/tools/plasticscm/cm.exe shell --defaultencoding --commfile=/Users/j.thomae/Library/Caches/IntelliJIdea15/tmp/cmshell4213764275984196958javaDotNet

It seems that this still needs some work. Even after closing down IntellIJ there are still a lot of plastic shells running and they are not going away. I had to manually kill them.

Link to comment
Share on other sites

  • 1 month later...

Hi derkork,

 

I've just installed IntelliJ IDEA 14 and 15, and Plastic SCM for Mac on a clean Mac using El Capitan. I've copied the zipped contents Manu posted above into /Applications/IntelliJ\ IDEA\ <version>.app/Contents/plugins, as I think you already did. I also confirmed that the cm executable was in the command line. I configured macplastic using the macplastic.app application. Surprisingly, I didn't find any trouble using Plastic inside IDEA. I was able to create a new project from VCS checkout or creating a new workspace for a new IDEA project. Checkin, checkout, update and all other functionalities didn't cause any trouble and only one cm shell process was running at the same time.

 

At this point, can you verify that the directory /Users/j.thomae/Library/Caches/IntelliJIdea15/tmp exists and your user has write permissions in it? If it didn't, it might be possible that IDEA can't find the commfile passed to the cm shell process. This would mean that IDEA can't assure that the cm shell is ready to accept commands, opening new shells as retries.

 

I would ask you to reinstall MacPlastic, backing up your config files. They shouldn't be inside the application directory but in your home directory, as you said. That is the default behaviour (as I've just tested and confirmed) and your /Applications/macplastic.app/Contents/MonoBundle directory should only contain remoting.conf and macplastic.log.conf, which aren't user-specific. I'd ask you to configure MacPlastic using the GUI, either opening it for the first time when no configuration is present in your system or through the preferences dialog. You can also manually launch the client configuration window by executing:

open /Applications/macplastic.app --args --configure

As Manu said, the "Configure client" is not compatible with MacPlastic at the moment. How did you configure plastic the first time?

 

If reinstalling MacPlastic doesn't work and you still experience issues, I'd like you to configure the cm logging. You'll have to write this content inside the file /Application/macplastic.app/Contents/MonoBundle/cm.log.conf (you'll probably have to create it):

<log4net>
  <appender name="RollingFileAppender"
  type="log4net.Appender.RollingFileAppender">
    <file value="${HOME}/.plastic4/cm.log.txt" />
    <appendToFile value="true" />
    <rollingStyle value="Size" />
    <maxSizeRollBackups value="10" />
    <maximumFileSize value="100MB" />
    <staticLogFileName value="true" />
    <layout type="log4net.Layout.PatternLayout">
      <conversionPattern value="%date %property{TransactionID} %username at %property{ClientMachine} %-5level %logger - %message%newline" />
    </layout>
  </appender>

  <root>
    <level value="DEBUG" />
    <appender-ref ref="RollingFileAppender" />
  </root>
</log4net>
Also, set your macplastic root log level value to DEBUG by editing /Applications/macplastic.app/Contents/MonoBundle/macplastic.log.conf like this:
<log4net>
  <!-- appender definitions -->
  <root>
    <level value="DEBUG" />
    <appender-ref ref="RollingFileAppender" />
  </root>
</log4net>

After the failed execution you'll find a cm.log.txt file inside ${HOME}/.plastic4. We'd appreciate if you could sent it to us along with ${HOME}/.plastic4/macplastic.log.txt and the IDEA log (it can be found by clicking on the "Help->Show Log in Finder" IDEA menu option).

 

Regards,

Miguel

Link to comment
Share on other sites

  • 4 weeks later...
  • 5 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...