Coder Social home page Coder Social logo

p4ic4idea's Introduction

Perforce IDEA Community Integration

VCS support for Perforce

The plugin allows for associating an IntelliJ IDEA Community Edition IDE project with a Perforce repository through IDEA's built-in VCS support.

Currently Supported IDEA versions: 13.5 through 15 which includes Android Studio 1.0

Getting Started

  1. Install the plugin by one of these methods:
    • From within IDEA
      1. Open the IDE settings dialog ( File -> Settings... ).
      2. Navigate to the Plugins panel.
      3. Click the Browse repositories... button.
      4. Select the Perforce IDEA Community Integration plugin.
    • Download and install from disk:
      1. Download from the Jetbrains plugin center or from the Github releases
      2. In IDEA, open the IDE settings dialog ( File -> Settings... ).
      3. Navigate to the Plugins panel.
      4. Click the Install plugin from disk... button.
      5. Select the downloaded zip file.
    • Build it yourself:
      1. You'll need Ant 1.8 or better, a JDK 1.6, and the source code from GitHub on your local computer. You'll need a copy of p4d (or p4s for Windows) to run the tests. The code comes with copies of the correct dependent libraries. Note: the GitHub sources use a remote repository to host the large IntelliJ dependent Jar files.
      2. Copy the local.properties.template to local.properties in the source root directory, and edit the values to match your configuration.
      3. Run ant from the root source directory.
      4. In IDEA, open the IDE settings dialog ( File -> Settings... ).
      5. Navigate to the Plugins panel.
      6. Click the Install plugin from disk... button.
      7. Select p4ic4idea.zip from the source root directory.
  2. In IDEA, select the VCS root directory managed by Perforce.
    1. Open the IDE settings dialog ( File -> Settings... ).
    2. Select the Version Control panel.
    3. Select the root directory from the list (or add a new one), and choose "Perforce" from the drop-down selection.
  3. Choose the Perforce connection method.
    1. From either the Version Control panel (select the pencil icon with the Perforce root selected), or the Perforce panel under the Version Control.
    2. Select the connection type and the parameters, and click OK.

Connecting to Your Perforce Server

In the Perforce configuration panel, you must choose the way in which the plugin connects to the Perforce server. There are several methods available.

For any of these methods, the Perforce server may request a password from you. If you choose the Save passwords option, the password will be stored application-wide, associated with that server and user name.

Direct Declaration

There are two methods available that allow you to directly declare the connection parameters, Client Password and Authorization Ticket.

Both of these connection types require you to enter the server connection string ("Perforce port") and the username. If a password is required, you will be prompted for it.

The "Perforce port" is usually just in the form "hostname:port number". SSL connections will need to use "ssl://hostname:port number".

Indirect Declaration

Alternatively, you can use connection methods that simulate how the Perforce command-line clients connect to the server. All of these use the following standard keys:

  • P4PORT: server connection string. SSL connections need to use the "ssl://hostname:port number" format.
  • P4USER: username used to connect to the server.
  • P4PASSWD: password used to connect to the server. If not provided, you may be required to enter it.
  • P4TICKETS: storage location for the Perforce ticket files. If present, the plugin assumes that the connection will perform a "p4 login" and store the associated ticket in that file.
  • P4TRUST: location of the trust ticket.
  • P4SSLDIR: directory containing the SSL connection information. Currently not supported.
  • P4CONFIG: these settings can be loaded from a configuration file. Note: P4CONFIG settings are only loaded from one file; you can't have config files referencing other config files.
  • P4CLIENT: Default client workspace name. You can override this in the UI.

Environment Variables

This connection method uses the environment variables that launched the IDE as the connection properties. For Windows users, it also checks the registry entries for the corresponding values.

This currently doesn't support Mac OSX local settings.

Specific P4CONFIG File

Reads the connection settings from a single configuration file.

Relative P4CONFIG File

This is the only connection method that allows for multiple servers and clients to be referenced from a single project. This works by finding a P4CONFIG file (with the name given in the UI) which is in the current directory, or some parent directory, of each file being referenced. This replicates how the Perforce command-line tool searches for settings.

For example, with the file name set to .p4config, you can put one copy of this file into each module root directory. Then, each module will have its files managed in their own client and server.

Some parts of the normal operation will act a bit differently. For instance, IDEA changelists can be associated with multiple Perforce changelists, if files from different clients are added to them. You can move files across servers, but these will be turned into simple add/delete operations. If you submit an IDEA changelist that is associated with multiple servers, then you will not be able to associate jobs with it.

Workflow

With your working Perforce connections specified, you can use the IDE as usual. Editing files will check them out from the server. Moving or renaming files will trigger a P4 rename operation. Deleting files will delete them from the server. All edited files will show up in the IntelliJ change lists, and those will be associated with the corresponding Perforce change.

From the change lists, you can view a difference against the head revision. You can also view the file history, and compare different revisions against each other.

When submitting a changelist, you may associate Perforce jobs with the changelist, and set the job status. This association will only be used when the changelist is actually submitted.

p4ic4idea's People

Contributors

groboclown avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.