groboclown / p4ic4idea Goto Github PK
View Code? Open in Web Editor NEWPerforce IDEA Community VCS Integration
License: Apache License 2.0
Perforce IDEA Community VCS Integration
License: Apache License 2.0
IChangelist.getJobs() can throw a RequestException if the resulting map isn't parsed correctly by the underlying P4Java API class. For example:
com.perforce.p4java.exception.RequestException: Error detected at line 31.
Syntax error in 'can'.
at com.perforce.p4java.impl.mapbased.server.Server.handleErrorStr(Server.java:4989)
at com.perforce.p4java.impl.mapbased.server.Server.getJob(Server.java:3714)
at com.perforce.p4java.impl.generic.core.Changelist.getJobs(Changelist.java:426)
Some files which are managed by Perforce can show up as locally modified without checkout, without actually being changed.
A deeper inspection of these files should be done to ensure that they need to be marked this way.
If you create an empty IDEA changelist, it is not associated immediately with a p4 changelist.
If you then drag a file from a p4-backed IDEA changelist into the new IDEA changelist, the plugin will correctly create the new changelist, but the UI will not display the associated connection information until the user does something to refresh the screen (expand/collapse on the changelist, refresh the view, etc).
I just installed this plugin directly using the Android Studio JetBrains plugin browser. It crashes on startup with the following stacktrace:
com.intellij.diagnostic.PluginException: net/groboclown/idea/p4ic/config/PasswordStoreService : Unsupported major.minor version 51.0 [Plugin: PerforceIC]
at com.intellij.ide.plugins.cl.PluginClassLoader.loadClassInsideSelf(PluginClassLoader.java:130)
at com.intellij.ide.plugins.cl.PluginClassLoader.tryLoadingClass(PluginClassLoader.java:77)
at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:66)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:249)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentsRegistry.loadClasses(ComponentManagerImpl.java:408)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentsRegistry.loadClasses(ComponentManagerImpl.java:398)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentsRegistry.access$000(ComponentManagerImpl.java:384)
at com.intellij.openapi.components.impl.ComponentManagerImpl.createComponents(ComponentManagerImpl.java:107)
at com.intellij.openapi.components.impl.ComponentManagerImpl.init(ComponentManagerImpl.java:89)
at com.intellij.openapi.components.impl.stores.ApplicationStoreImpl.load(ApplicationStoreImpl.java:87)
at com.intellij.openapi.application.impl.ApplicationImpl.load(ApplicationImpl.java:508)
at com.intellij.idea.IdeaApplication.run(IdeaApplication.java:151)
at com.intellij.idea.MainImpl$1$1$1.run(MainImpl.java:46)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:715)
at java.awt.EventQueue.access$400(EventQueue.java:82)
at java.awt.EventQueue$2.run(EventQueue.java:676)
at java.awt.EventQueue$2.run(EventQueue.java:674)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:685)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:697)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:524)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:335)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused by: java.lang.UnsupportedClassVersionError: net/groboclown/idea/p4ic/config/PasswordStoreService : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)
at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
at java.lang.ClassLoader.defineClass(ClassLoader.java:471)
at com.intellij.util.lang.UrlClassLoader._defineClass(UrlClassLoader.java:195)
at com.intellij.util.lang.UrlClassLoader.defineClass(UrlClassLoader.java:191)
at com.intellij.util.lang.UrlClassLoader._findClass(UrlClassLoader.java:167)
at com.intellij.ide.plugins.cl.PluginClassLoader.loadClassInsideSelf(PluginClassLoader.java:124)
... 31 more
This is using Android Studio 1.1.0 on OSX 10.9.5, JDK 1.6.0_65.
Add back the ability to submit a changelist to the server. It currently just reports an error on submit.
You watched me do this, Matt, but if I try to have the plugin find my P4CONFIG file (named .p4config in my case, which is what I specified in the dialog) automatically in the hierarchy, it tells me that no such file is found with the EXACT path of the existing file.
If the user runs a version of the IDE that is not within the compatibility support (the CompatFactory implementations), the user should be notified with a descriptive dialog that explains the problem. Also, it should tell the user to post a bug here asking for support with that version of the api.
The Android Studio tool (v1.0.1) uses IDEA build 135.x. Compatibility with that version of IDEA would be nice.
Additionally, this will start the much needed work of cross-version compatibility layers.
If you rename or move a file, the other files in that original directory (and even the directory itself) will be marked as "Modified without checkout". A refresh is required to put them in the correct state.
There's a deadlock that can happen when P4Exec.p4RunFor()
encounters a ConnectionException
. It calls serverStatus.onDisconnect()
, which enters a synchronization block on connectionSync
when it calls out to a future.get()
. This can call out in a different thread (AWT) for ServerStoreSrevice.onDisconnect()
which will try to enter the connectionSync
block itself, causing a deadlock.
Currently, the connection widget shows the status for all the servers - if any server is disconnected, then it shows disconnected. Likewise, the connect / reconnect buttons are for all the servers. These should instead support connections for all the current project's servers.
While working in offline mode, if you attempt to add a file, the plugin generates an NPE.
WARN - clown.idea.p4ic.ui.ErrorDialog - Something threw an invalid exception without being properly wrapped
java.lang.NullPointerException
at net.groboclown.idea.p4ic.extension.P4VFSListener$3.run(P4VFSListener.java:176)
at net.groboclown.idea.p4ic.background.Background.runInBackground(Background.java:54)
at net.groboclown.idea.p4ic.extension.P4VFSListener.performAdding(P4VFSListener.java:166)
at com.intellij.openapi.vcs.VcsVFSListener.executeAdd(VcsVFSListener.java:173)
at com.intellij.openapi.vcs.VcsVFSListener.executeAdd(VcsVFSListener.java:132)
at com.intellij.openapi.vcs.VcsVFSListener$MyCommandAdapter.commandFinished(VcsVFSListener.java:505)
at com.intellij.openapi.command.impl.CoreCommandProcessor.fireCommandFinished(CoreCommandProcessor.java:187)
at com.intellij.openapi.command.impl.CoreCommandProcessor.finishCommand(CoreCommandProcessor.java:161)
at com.intellij.openapi.command.impl.CommandProcessorImpl.finishCommand(CommandProcessorImpl.java:54)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:130)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:99)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:85)
at com.intellij.refactoring.copy.CopyClassesHandler.copyClassesImpl(CopyClassesHandler.java:305)
at com.intellij.refactoring.copy.CopyClassesHandler.doCopy(CopyClassesHandler.java:229)
at com.intellij.refactoring.copy.CopyHandler.doCopy(CopyHandler.java:55)
at com.intellij.ide.CopyPasteDelegator$MyEditable.performDefaultPaste(CopyPasteDelegator.java:168)
at com.intellij.ide.CopyPasteDelegator$MyEditable.performPaste(CopyPasteDelegator.java:131)
at com.intellij.ide.actions.PasteAction.actionPerformed(PasteAction.java:42)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher$3.performAction(IdeKeyEventDispatcher.java:586)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction(IdeKeyEventDispatcher.java:637)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.inInitState(IdeKeyEventDispatcher.java:476)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.dispatchKeyEvent(IdeKeyEventDispatcher.java:212)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:538)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:382)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
When the plugin receives disconnect or connect messages, the connection status widget does not reflect the correct state; the user must click on it to see the actual state.
It looks like an issue with the MessageBus event being sent at the wrong time.
The current "compare with" dialog was designed around using simple revision numbers, not for full Perforce path information. This needs to be a new dialog with more robust features to make it actually readable.
The current SSL connection UI is a big "TODO". This needs to be replaced with working code.
If the user selects to not add a file to Perforce, IDEA shows the standard "You can add it later" message, but the plugin then adds the file to a Perforce changelist.
It looks like the changelist inspection code is a bit too aggressive here.
The "relative P4CONFIG" connection should require that the client is loaded from the p4config files, and thus the client load button should be disabled. However, it isn't always disabled.
The connection settings does not show the trusted ticket file field.
The new versions of Perforce (2015.1) will include support for a new work-disconnected mode, called "dvcs". It would be really nice to add native plugin support for the disconnected mode.
When the user switches to working offline, then at a later point attempts to reconnect, the server can report a connection problem of "User selected to work offline". This obviously shouldn't be a restriction to connecting.
The UI has many elements which do not provide tooltips. This should be provided.
When calling the IServer.getFileContents() command, extra table locking information is returned at the tail of the returned text. This forces the code to have a hack to strip it out.
If a check-in to the server fails due to merge issues, then the check-in should fail with the reported message ("need to resolve differences"). However, the message is lost and the user just sees their checked-in files still open for edit.
The same thing happens if the changelist is submitted and the set of jobs passed in on submit is invalid, or if the job status is invalid.
If a file is moved under Perforce control, then the move is reverted, the UI does not show the correct state. A refresh must run in order to pick up the updated state.
In Android Studio, picocontainer fails to load the P4ChangeListDecorator due to com.intellij.openapi.project.Project being one of the unsatisfiable dependencies.
If a user has a file checked out in their local client, and they perform a "synchronize" that would otherwise cause the file to be updated, the P4 server will report a message about how the file will need to be merged. However, this is not reported to the user.
The synchronize status should report that the file is not merged, but needs to be, before submit.
The plugin contains many locations with hard-coded settings, such as maximum number of server connections, which should instead be controlled by the user. The plugin needs a framework for setting and reading these.
Given a project has two directories with different clients, but the clients share a single server.
If the user moves a file across the client directories, the the plugin should realize that they share a server, and perform an integrate / delete (move isn't possible).
Right now, the behavior is just a add / delete, rather than integrate. This loses the history.
The RawServerExecutor
does not properly handle the translation of file encoding specified in the file information, nor as the client requests.
This requires special investigation to see what should be done by the client when receiving the file.
Currently, the plugin is restricted to just viewing the version history for the current branch, and it does not go across the inherited branch. This is due to a limitation in the VcsRevisionNumber.Int that restricts the version to just the file revision. This needs to be expanded to allow a revision that goes deep across branches. The diff support also needs to allow for reading files that aren't in the client workspace; however, it looks like the existing code already supports that.
The "synchronize" dialog should allow for browsing for labels and changelists.
(This is related to bug #33, which was fixed in that extra protection was added to better investigate future issues).
The P4JavaAPI is sometimes making incorrect requests to p4d with the job details when it gives the job ID. The source is either the jobs associated with the changelist are incorrectly parsed, returning the wrong values, or the wrong value is passed as the job ID, or something in the P4Java API is adding incorrect data to the request.
Changelists should have the option to allow them to "revert unchanged files", just as P4V does.
There are some circumstances where a series of quick calls to refresh the changelists are made, but a final adjustment is done by Idea that requires that last call to the refresh. Due to the fixes in 0.5.2 that limited the number of calls made, the last refresh can be missed, which results in an incorrect display of the changelists (the user will need a manual refresh).
A watcher thread can be added to keep track of the refreshes, and initiate a call after a longer time if the last refresh was ignored.
It would be nice to include some usability smarts, such as don't initiate a call if the user is interacting with the changelists.
When synchronizing files, the user should have the option to choose which changelist or revision or other category to synchronize.
Changelists may need to have jobs associated with them before a commit is allowed. However, the UI currently has no way to associate a job with a changelist.
The "Resolved values" part of the Config panel starts off uninitialized. It should be initially empty, and only load up values when the "Refresh resolved properties" button is pressed.
It should also be used to indicate whether any .p4config files can be found. See bug #32 for a related issue.
Ater synchronizing the user is not informed about needs for resolve. Also, after submit with files that need resolving does not allow the user to resolve. This part of the VCS extension needs support.
Hello, I'm unable to use Your plugin because of this message when I'm trying to check connection: http://screenshot.cz/ZNOHJ/
-port is OK (1666), but the error message says it's wrong, i guess the problem is because of dots in server ip, thanks.
EDIT: the problem was in my p4config file, there was a blank space after my port, so not "1666", but "1666 ". But there is still another problem whether if I try to check connection via cfg file or with just typing port and username, it will always stuck, no pop up window is shown, img: http://screenshot.cz/KN8ZC/ - I was waiting several minutes but nothing happened. Idea version: 14.0.3.Thanks for help.
EDIT2: see last comment, thanks.
When a change list is committed, the user should have the opportunity to select the correct job status to associate with the submitted jobs.
The Job UI needs to implement the search capability, with good filtering support.
Add the ability to sync to head (default), or choose a revision / changelist to sync from the Perforce repository.
Syncing to a changelist may be tricky when dealing with multiple servers.
From the diff view, the user should be able to change which version to diff against.
The P4 file context menu does not have the update files (synchronize) option. This needs to be added.
To reproduce in 140.2285.5:
This will cause an NPE in P4ConfigConnectionPanel.setConfigFileText
line 152.
When the user moves a file (or renames it), the plugin treats the two files (the deleted and new one) as a pair in regards to the changelists, just as P4V does. If you move one of the pair of files into another changelist, the other one moves as well. However, the UI does not reflect this change until a refresh happens.
My connection to Perforce is periodically lost (every few minutes). When the connection fails, P4V also cannot connect. This lasts for a minute or two, then everything is fine until it happens again. This does not happen on machines that do not have this plugin installed. It also does not happen using the Simple P4 Plugin. My Connection Type is "Specific P4CONFIG File"
In the update from VCS menu, the user should be allowed to select which version of the file to pull. Right now, it only pulls from the head revision.
Also, allow for selecting "force synchronize".
On occasion, some files that are open for edit are moved into the active changelist.
Error messages end up being seen by the user (in most cases). Because of this, they need to be localized.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.