Merge remote-tracking branch 'origin/master'

This commit is contained in:
Ilya.Kazakevich
2014-03-19 20:59:09 +04:00
48 changed files with 2161 additions and 789 deletions
@@ -31,7 +31,6 @@ import com.intellij.openapi.editor.colors.EditorColorsManager;
import com.intellij.openapi.editor.colors.EditorColorsScheme;
import com.intellij.openapi.editor.ex.MarkupModelEx;
import com.intellij.openapi.editor.impl.DocumentMarkupModel;
import com.intellij.openapi.editor.markup.MarkupEditorFilterFactory;
import com.intellij.openapi.editor.markup.RangeHighlighter;
import com.intellij.openapi.editor.markup.TextAttributes;
import com.intellij.openapi.fileEditor.FileDocumentManager;
@@ -68,9 +67,6 @@ import javax.swing.*;
* Time: 3:22:55 PM
*/
public abstract class BreakpointWithHighlighter<P extends JavaBreakpointProperties> extends Breakpoint<P> {
@Nullable
private RangeHighlighter myHighlighter;
@Nullable
private SourcePosition mySourcePosition;
@@ -127,10 +123,6 @@ public abstract class BreakpointWithHighlighter<P extends JavaBreakpointProperti
@Nullable
public BreakpointWithHighlighter init() {
if (!isValid()) {
final RangeHighlighter highlighter = myHighlighter;
if (highlighter != null) {
highlighter.dispose();
}
return null;
}
@@ -190,23 +182,6 @@ public abstract class BreakpointWithHighlighter<P extends JavaBreakpointProperti
reload();
}
public BreakpointWithHighlighter(@NotNull final Project project, @NotNull final RangeHighlighter highlighter, XBreakpoint breakpoint) {
super(project, breakpoint);
myHighlighter = highlighter;
setEditorFilter(highlighter);
reload();
}
protected void setEditorFilter(RangeHighlighter highlighter) {
highlighter.setEditorFilter(MarkupEditorFilterFactory.createIsNotDiffFilter());
}
@Nullable
public RangeHighlighter getHighlighter() {
ApplicationManager.getApplication().assertReadAccessAllowed();
return myHighlighter;
}
@Override
public boolean isValid() {
return isPositionValid(myXBreakpoint.getSourcePosition());
@@ -417,27 +392,6 @@ public abstract class BreakpointWithHighlighter<P extends JavaBreakpointProperti
}
}
/**
* called by BreakpointManager when destroying the breakpoint
*/
@Override
public void delete() {
if (isVisible()) {
final RangeHighlighter highlighter = getHighlighter();
if (highlighter != null) {
DebuggerInvocationUtil.invokeLater(getProject(), new Runnable() {
@Override
public void run() {
highlighter.dispose();
//we should delete it here, so gutter will not fire events to deleted breakpoint
BreakpointWithHighlighter.super.delete();
}
});
}
}
}
public boolean isAt(@NotNull Document document, int offset) {
final VirtualFile file = FileDocumentManager.getInstance().getFile(document);
int line = document.getLineNumber(offset);
@@ -471,59 +425,59 @@ public abstract class BreakpointWithHighlighter<P extends JavaBreakpointProperti
@Override
public abstract Key<? extends BreakpointWithHighlighter> getCategory();
public boolean canMoveTo(@Nullable final SourcePosition position) {
if (position == null || !position.getFile().isValid()) {
return false;
}
final PsiFile psiFile = position.getFile();
final Document document = PsiDocumentManager.getInstance(getProject()).getDocument(psiFile);
if (document == null) {
return false;
}
final int spOffset = position.getOffset();
if (spOffset < 0) {
return false;
}
final BreakpointManager breakpointManager = DebuggerManagerEx.getInstanceEx(getProject()).getBreakpointManager();
return breakpointManager.findBreakpoint(document, spOffset, getCategory()) == null;
}
//public boolean canMoveTo(@Nullable final SourcePosition position) {
// if (position == null || !position.getFile().isValid()) {
// return false;
// }
// final PsiFile psiFile = position.getFile();
// final Document document = PsiDocumentManager.getInstance(getProject()).getDocument(psiFile);
// if (document == null) {
// return false;
// }
// final int spOffset = position.getOffset();
// if (spOffset < 0) {
// return false;
// }
// final BreakpointManager breakpointManager = DebuggerManagerEx.getInstanceEx(getProject()).getBreakpointManager();
// return breakpointManager.findBreakpoint(document, spOffset, getCategory()) == null;
//}
public boolean moveTo(@NotNull SourcePosition position) {
if (!canMoveTo(position)) {
return false;
}
final PsiFile psiFile = position.getFile();
final PsiFile oldFile = getSourcePosition().getFile();
final Document document = PsiDocumentManager.getInstance(getProject()).getDocument(psiFile);
final Document oldDocument = PsiDocumentManager.getInstance(getProject()).getDocument(oldFile);
if (document == null || oldDocument == null) {
return false;
}
final RangeHighlighter newHighlighter = createHighlighter(myProject, document, position.getLine());
if (newHighlighter == null) {
return false;
}
final RangeHighlighter oldHighlighter = myHighlighter;
myHighlighter = newHighlighter;
reload();
if (!isValid()) {
myHighlighter.dispose();
myHighlighter = oldHighlighter;
reload();
return false;
}
if (oldHighlighter != null) {
oldHighlighter.dispose();
}
DebuggerManagerEx.getInstanceEx(getProject()).getBreakpointManager().fireBreakpointChanged(this);
updateUI();
return true;
}
//public boolean moveTo(@NotNull SourcePosition position) {
// if (!canMoveTo(position)) {
// return false;
// }
// final PsiFile psiFile = position.getFile();
// final PsiFile oldFile = getSourcePosition().getFile();
// final Document document = PsiDocumentManager.getInstance(getProject()).getDocument(psiFile);
// final Document oldDocument = PsiDocumentManager.getInstance(getProject()).getDocument(oldFile);
// if (document == null || oldDocument == null) {
// return false;
// }
// final RangeHighlighter newHighlighter = createHighlighter(myProject, document, position.getLine());
// if (newHighlighter == null) {
// return false;
// }
// final RangeHighlighter oldHighlighter = myHighlighter;
// myHighlighter = newHighlighter;
//
// reload();
//
// if (!isValid()) {
// myHighlighter.dispose();
// myHighlighter = oldHighlighter;
// reload();
// return false;
// }
//
// if (oldHighlighter != null) {
// oldHighlighter.dispose();
// }
//
// DebuggerManagerEx.getInstanceEx(getProject()).getBreakpointManager().fireBreakpointChanged(this);
// updateUI();
//
// return true;
//}
public boolean isVisible() {
return myVisible;
@@ -535,13 +489,8 @@ public abstract class BreakpointWithHighlighter<P extends JavaBreakpointProperti
@Nullable
public Document getDocument() {
final RangeHighlighter highlighter = getHighlighter();
if (highlighter != null) {
return highlighter.getDocument();
}
final SourcePosition position = getSourcePosition();
if (position != null) {
final PsiFile file = position.getFile();
final PsiFile file = getPsiFile();
if (file != null) {
return PsiDocumentManager.getInstance(getProject()).getDocument(file);
}
return null;
@@ -148,11 +148,11 @@ public class FieldBreakpoint extends BreakpointWithHighlighter<JavaFieldBreakpoi
}
}
@Override
public boolean moveTo(@NotNull SourcePosition position) {
final PsiField field = PositionUtil.getPsiElementAt(getProject(), PsiField.class, position);
return field != null && super.moveTo(SourcePosition.createFromElement(field));
}
//@Override
//public boolean moveTo(@NotNull SourcePosition position) {
// final PsiField field = PositionUtil.getPsiElementAt(getProject(), PsiField.class, position);
// return field != null && super.moveTo(SourcePosition.createFromElement(field));
//}
@Override
protected ObjectReference getThisObject(SuspendContextImpl context, LocatableEvent event) throws EvaluateException {
@@ -291,10 +291,10 @@ public class FieldBreakpoint extends BreakpointWithHighlighter<JavaFieldBreakpoi
return (FieldBreakpoint)breakpoint.init();
}
@Override
public boolean canMoveTo(final SourcePosition position) {
return super.canMoveTo(position) && PositionUtil.getPsiElementAt(getProject(), PsiField.class, position) != null;
}
//@Override
//public boolean canMoveTo(final SourcePosition position) {
// return super.canMoveTo(position) && PositionUtil.getPsiElementAt(getProject(), PsiField.class, position) != null;
//}
@Override
public boolean isValid() {
@@ -34,7 +34,6 @@ import com.intellij.icons.AllIcons;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.editor.Document;
import com.intellij.openapi.editor.markup.RangeHighlighter;
import com.intellij.openapi.module.Module;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.roots.ProjectFileIndex;
@@ -124,16 +123,11 @@ public class LineBreakpoint extends BreakpointWithHighlighter {
@Override
protected void reload(PsiFile file) {
super.reload(file);
int offset;
final SourcePosition position = getSourcePosition();
if (position != null) {
offset = position.getOffset();
int offset = position.getOffset();
myOwnerMethodName = findOwnerMethod(file, offset);
}
else {
final RangeHighlighter highlighter = getHighlighter();
offset = highlighter != null? highlighter.getStartOffset() : -1;
}
myOwnerMethodName = findOwnerMethod(file, offset);
}
@Override
@@ -34,7 +34,6 @@ import com.intellij.debugger.impl.PositionUtil;
import com.intellij.icons.AllIcons;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.editor.Document;
import com.intellij.openapi.editor.markup.RangeHighlighter;
import com.intellij.openapi.project.IndexNotReadyException;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.Computable;
@@ -76,10 +75,6 @@ public class MethodBreakpoint extends BreakpointWithHighlighter<JavaMethodBreakp
super(project, breakpoint);
}
private MethodBreakpoint(@NotNull Project project, @NotNull RangeHighlighter highlighter) {
super(project, highlighter, null);
}
public boolean isStatic() {
return myIsStatic;
}
@@ -300,9 +295,9 @@ public class MethodBreakpoint extends BreakpointWithHighlighter<JavaMethodBreakp
}
public boolean canMoveTo(final SourcePosition position) {
return super.canMoveTo(position) && PositionUtil.getPsiElementAt(getProject(), PsiMethod.class, position) != null;
}
//public boolean canMoveTo(final SourcePosition position) {
// return super.canMoveTo(position) && PositionUtil.getPsiElementAt(getProject(), PsiMethod.class, position) != null;
//}
/**
* finds FQ method's class name and method's signature
@@ -2,7 +2,6 @@ package org.jetbrains.java.debugger.breakpoints;
import com.intellij.debugger.ui.breakpoints.LineBreakpoint;
import com.intellij.openapi.editor.Document;
import com.intellij.openapi.editor.markup.RangeHighlighter;
import com.intellij.openapi.fileEditor.FileDocumentManager;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.vfs.VirtualFile;
@@ -34,10 +33,6 @@ public abstract class JavaBreakpointAdapterBase extends XBreakpointAdapter<XLine
}
protected void configureCreatedBreakpoint(LineBreakpoint oldBreakpoint, XLineBreakpoint<XBreakpointProperties> breakpoint) {
final RangeHighlighter highlighter = oldBreakpoint.getHighlighter();
if (highlighter != null) {
highlighter.dispose();
}
}
@Override
@@ -16,7 +16,6 @@
package com.intellij.psi.impl.compiled;
import com.intellij.diagnostic.PluginException;
import com.intellij.ide.caches.FileContent;
import com.intellij.ide.highlighter.JavaClassFileType;
import com.intellij.ide.highlighter.JavaFileType;
import com.intellij.ide.plugins.PluginManagerCore;
@@ -476,11 +475,6 @@ public class ClsFileImpl extends ClsRepositoryPsiElement<PsiClassHolderFileStub>
}
}
@Override
public PsiFile cacheCopy(final FileContent content) {
return this;
}
@Override
public void putInfo(@NotNull Map<String, String> info) {
PsiFileImpl.putInfo(this, info);
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2013 JetBrains s.r.o.
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,11 +14,10 @@
* limitations under the License.
*/
package com.intellij.codeInsight.highlighting
import com.intellij.JavaTestUtil
import com.intellij.codeInsight.daemon.impl.HighlightInfoType
import com.intellij.codeInsight.daemon.impl.IdentifierHighlighterPassFactory
import com.intellij.codeInspection.sillyAssignment.SillyAssignmentInspection
import com.intellij.lang.annotation.HighlightSeverity
import com.intellij.testFramework.fixtures.LightCodeInsightFixtureTestCase
import org.jetbrains.annotations.NonNls
/**
@@ -233,7 +232,7 @@ class Bar {
try {
def infos = myFixture.doHighlighting()
//import highlighted twice: for each overloaded usage target
assert infos.findAll { it.severity == HighlightSeverity.INFORMATION && myFixture.file.text.substring(it.startOffset, it.endOffset) == 'foo' }.size() == 3
assert infos.findAll { it.severity == HighlightInfoType.ELEMENT_UNDER_CARET_SEVERITY && myFixture.file.text.substring(it.startOffset, it.endOffset) == 'foo' }.size() == 3
}
finally {
IdentifierHighlighterPassFactory.ourTestingIdentifierHighlighting = false
@@ -129,7 +129,7 @@ public class IdeaPluginDescriptorImpl implements IdeaPluginDescriptor {
}
public void readExternal(@NotNull Document document, @NotNull URL url) throws InvalidDataException, FileNotFoundException {
document = JDOMXIncluder.resolve(document, url.toExternalForm());
document = JDOMXIncluder.resolve(document, url.toExternalForm(), ApplicationManager.getApplication().isUnitTestMode());
Element rootElement = document.getRootElement();
internJDOMElement(rootElement);
readExternal(document.getRootElement());
@@ -16,7 +16,6 @@
package com.intellij.psi.impl;
import com.intellij.ide.caches.FileContent;
import com.intellij.openapi.util.Key;
import com.intellij.psi.PsiFile;
@@ -25,5 +24,4 @@ public interface PsiFileEx extends PsiFile{
boolean isContentsLoaded();
void onContentReload();
PsiFile cacheCopy(final FileContent content); // See CacheUtil
}
@@ -16,7 +16,6 @@
package com.intellij.psi.impl;
import com.intellij.ide.caches.FileContent;
import com.intellij.lang.PsiBuilderFactory;
import com.intellij.openapi.Disposable;
import com.intellij.openapi.application.ApplicationManager;
@@ -27,11 +26,9 @@ import com.intellij.openapi.progress.ProgressIndicatorProvider;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.roots.FileIndexFacade;
import com.intellij.openapi.util.Disposer;
import com.intellij.openapi.util.Key;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.openapi.vfs.VirtualFileFilter;
import com.intellij.psi.*;
import com.intellij.psi.impl.cache.CacheUtil;
import com.intellij.psi.impl.file.impl.FileManager;
import com.intellij.psi.impl.file.impl.FileManagerImpl;
import com.intellij.psi.util.PsiModificationTracker;
@@ -67,7 +64,6 @@ public class PsiManagerImpl extends PsiManagerEx {
private final AtomicInteger myBatchFilesProcessingModeCount = new AtomicInteger(0);
private static final Key<PsiFile> CACHED_PSI_FILE_COPY_IN_FILECONTENT = Key.create("CACHED_PSI_FILE_COPY_IN_FILECONTENT");
public static final Topic<AnyPsiChangeListener> ANY_PSI_CHANGE_TOPIC =
Topic.create("ANY_PSI_CHANGE_TOPIC", AnyPsiChangeListener.class, Topic.BroadcastDirection.TO_PARENT);
@@ -200,25 +196,6 @@ public class PsiManagerImpl extends PsiManagerEx {
LOG.assertTrue(ApplicationManager.getApplication().isUnitTestMode());
}
@Nullable
public PsiFile getFile(@NotNull FileContent content) {
PsiFile psiFile = content.getUserData(CACHED_PSI_FILE_COPY_IN_FILECONTENT);
if (psiFile == null) {
final VirtualFile vFile = content.getVirtualFile();
psiFile = myFileManager.getCachedPsiFile(vFile);
if (psiFile == null) {
psiFile = findFile(vFile);
if (psiFile == null) return null;
psiFile = CacheUtil.createFileCopy(content, psiFile);
}
//psiFile = content.putUserDataIfAbsent(CACHED_PSI_FILE_COPY_IN_FILECONTENT, psiFile);
content.putUserData(CACHED_PSI_FILE_COPY_IN_FILECONTENT, psiFile);
}
LOG.assertTrue(psiFile instanceof PsiCompiledElement || psiFile.isValid());
return psiFile;
}
@Override
public PsiDirectory findDirectory(@NotNull VirtualFile file) {
ProgressIndicatorProvider.checkCanceled();
@@ -16,61 +16,13 @@
package com.intellij.psi.impl.cache;
import com.intellij.ide.caches.FileContent;
import com.intellij.lang.Language;
import com.intellij.lang.LanguageParserDefinitions;
import com.intellij.lang.ParserDefinition;
import com.intellij.openapi.editor.Document;
import com.intellij.openapi.fileEditor.FileDocumentManager;
import com.intellij.openapi.fileEditor.impl.LoadTextUtil;
import com.intellij.openapi.util.Key;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.psi.PsiFile;
import com.intellij.psi.impl.PsiFileEx;
import com.intellij.psi.tree.IElementType;
import com.intellij.psi.tree.TokenSet;
import org.jetbrains.annotations.NotNull;
import java.io.IOException;
public class CacheUtil {
public static final Key<Boolean> CACHE_COPY_KEY = new Key<Boolean>("CACHE_COPY_KEY");
private CacheUtil() {
}
public static boolean isCopy(@NotNull PsiFile psiFile) {
return psiFile.getUserData(CACHE_COPY_KEY) != null;
}
public static PsiFile createFileCopy(FileContent content, PsiFile psiFile) {
VirtualFile vFile = psiFile.getVirtualFile();
if (vFile == null) return psiFile; // It's already a copy created via PsiManager.getFile(FileContent). Usually happens on initial startup.
if (psiFile instanceof PsiFileEx) {
return ((PsiFileEx)psiFile).cacheCopy(content);
}
return psiFile;
}
private static final Key<CharSequence> CONTENT_KEY = new Key<CharSequence>("CONTENT_KEY");
public static CharSequence getContentText(final FileContent content) {
final Document doc = FileDocumentManager.getInstance().getCachedDocument(content.getVirtualFile());
if (doc != null) return doc.getCharsSequence();
CharSequence cached = content.getUserData(CONTENT_KEY);
if (cached != null) return cached;
try {
cached = LoadTextUtil.getTextByBinaryPresentation(content.getBytes(), content.getVirtualFile(), false, false);
cached = content.putUserDataIfAbsent(CONTENT_KEY, cached);
return cached;
}
catch (IOException e) {
return "";
}
}
public static boolean isInComments(final IElementType tokenType) {
final Language language = tokenType.getLanguage();
@@ -17,7 +17,6 @@
package com.intellij.psi.impl.source;
import com.intellij.extapi.psi.StubBasedPsiElementBase;
import com.intellij.ide.caches.FileContent;
import com.intellij.ide.util.PsiNavigationSupport;
import com.intellij.lang.ASTFactory;
import com.intellij.lang.ASTNode;
@@ -29,7 +28,6 @@ import com.intellij.openapi.application.ModalityState;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.editor.Document;
import com.intellij.openapi.fileEditor.FileDocumentManager;
import com.intellij.openapi.fileTypes.FileType;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.ui.Queryable;
import com.intellij.openapi.util.Key;
@@ -374,10 +372,6 @@ public abstract class PsiFileImpl extends ElementBase implements PsiFileEx, PsiF
treeElement.rawAddChildrenWithoutNotifications(contentLeaf);
}
if (CacheUtil.isCopy(this)) {
treeElement.setCharTable(IdentityCharTable.INSTANCE);
}
return treeElement;
}
@@ -508,7 +502,7 @@ public abstract class PsiFileImpl extends ElementBase implements PsiFileEx, PsiF
@Override
public boolean isWritable() {
return getViewProvider().getVirtualFile().isWritable() && !CacheUtil.isCopy(this);
return getViewProvider().getVirtualFile().isWritable();
}
@Override
@@ -653,32 +647,6 @@ public abstract class PsiFileImpl extends ElementBase implements PsiFileEx, PsiF
}
}
@Override
public PsiFile cacheCopy(final FileContent content) {
if (isContentsLoaded()) {
return this;
}
else {
CharSequence text;
if (content == null) {
Document document = FileDocumentManager.getInstance().getDocument(getVirtualFile());
text = document.getCharsSequence();
}
else {
text = CacheUtil.getContentText(content);
}
FileType fileType = getFileType();
final String name = getName();
PsiFile fileCopy =
PsiFileFactory.getInstance(getProject()).createFileFromText(name, fileType, text, getModificationStamp(), false, false);
fileCopy.putUserData(CacheUtil.CACHE_COPY_KEY, Boolean.TRUE);
((PsiFileImpl)fileCopy).setOriginalFile(this);
return fileCopy;
}
}
@Nullable
public StubElement getStub() {
StubTree stubHolder = getStubTree();
@@ -74,7 +74,12 @@ public class EditorHighlighterFactoryImpl extends EditorHighlighterFactory {
return editorHighlighter;
}
}
return FileTypeEditorHighlighterProviders.INSTANCE.forFileType(fileType).getEditorHighlighter(project, fileType, vFile, settings);
try {
return FileTypeEditorHighlighterProviders.INSTANCE.forFileType(fileType).getEditorHighlighter(project, fileType, vFile, settings);
}
catch (Exception e) {
LOG.error(e);
}
}
SyntaxHighlighter highlighter = null;
@@ -16,7 +16,6 @@
package com.intellij.psi.impl.source;
import com.intellij.ide.caches.FileContent;
import com.intellij.ide.util.PsiNavigationSupport;
import com.intellij.lang.FileASTNode;
import com.intellij.lang.Language;
@@ -270,11 +269,6 @@ public abstract class LightPsiFileImpl extends PsiElementBase implements PsiFile
public void onContentReload() {
}
@Override
public PsiFile cacheCopy(final FileContent content) {
return this;
}
@Override
public boolean isWritable() {
return getViewProvider().getVirtualFile().isWritable();
@@ -15,28 +15,28 @@
*/
package com.intellij.openapi.options;
import com.intellij.util.containers.ContainerUtil;
import com.intellij.util.EventDispatcher;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.util.List;
public abstract class BaseConfigurableWithChangeSupport extends BaseConfigurable {
private final List<ChangeListener> myListeners = ContainerUtil.createLockFreeCopyOnWriteList();
private final EventDispatcher<ChangeListener> myDispatcher = EventDispatcher.create(ChangeListener.class);
public void setModified(final boolean modified) {
public void setModified(boolean modified) {
fireStateChanged();
super.setModified(modified);
}
public void addChangeListener(final ChangeListener listener) {
myListeners.add(listener);
public void addChangeListener(ChangeListener listener) {
myDispatcher.addListener(listener);
}
public void removeChangeListener(ChangeListener listener) {
myDispatcher.addListener(listener);
}
public void fireStateChanged() {
final ChangeEvent event = new ChangeEvent(this);
for (final ChangeListener listener : myListeners) {
listener.stateChanged(event);
}
myDispatcher.getMulticaster().stateChanged(new ChangeEvent(this));
}
}
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,7 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.intellij.openapi.ui.popup;
import com.intellij.openapi.project.Project;
@@ -37,15 +36,14 @@ import java.util.List;
* @author max
*/
public interface ComponentPopupBuilder {
@NotNull
ComponentPopupBuilder setTitle(String title);
@NotNull
ComponentPopupBuilder setResizable(final boolean forceResizable);
ComponentPopupBuilder setResizable(boolean forceResizable);
@NotNull
ComponentPopupBuilder setMovable(final boolean forceMovable);
ComponentPopupBuilder setMovable(boolean forceMovable);
@NotNull
ComponentPopupBuilder setRequestFocus(boolean requestFocus);
@@ -56,20 +54,14 @@ public interface ComponentPopupBuilder {
@NotNull
ComponentPopupBuilder setRequestFocusCondition(Project project, Condition<Project> condition);
/**
* @deprecated all popups are heavyweight now, lightweight popups no linger supported
*/
@NotNull
ComponentPopupBuilder setForceHeavyweight(boolean forceHeavyweight);
/**
* @see com.intellij.openapi.util.DimensionService
*/
@NotNull
ComponentPopupBuilder setDimensionServiceKey(@Nullable final Project project, @NonNls final String dimensionServiceKey, final boolean useForXYLocation);
ComponentPopupBuilder setDimensionServiceKey(@Nullable Project project, @NonNls String key, boolean useForXYLocation);
@NotNull
ComponentPopupBuilder setCancelCallback(final Computable<Boolean> shouldProceed);
ComponentPopupBuilder setCancelCallback(Computable<Boolean> shouldProceed);
@NotNull
ComponentPopupBuilder setCancelOnClickOutside(boolean cancel);
@@ -78,7 +70,7 @@ public interface ComponentPopupBuilder {
ComponentPopupBuilder addListener(JBPopupListener listener);
@NotNull
ComponentPopupBuilder setCancelOnMouseOutCallback(final MouseChecker shouldCancel);
ComponentPopupBuilder setCancelOnMouseOutCallback(MouseChecker shouldCancel);
@NotNull
JBPopup createPopup();
@@ -89,34 +81,41 @@ public interface ComponentPopupBuilder {
@NotNull
ComponentPopupBuilder setCancelOnOtherWindowOpen(boolean cancelOnWindow);
@NotNull ComponentPopupBuilder setTitleIcon(@NotNull ActiveIcon icon);
@NotNull ComponentPopupBuilder setCancelKeyEnabled(boolean enabled);
@NotNull ComponentPopupBuilder setLocateByContent(boolean byContent);
@NotNull
ComponentPopupBuilder setTitleIcon(@NotNull ActiveIcon icon);
@NotNull ComponentPopupBuilder setLocateWithinScreenBounds(boolean within);
@NotNull
ComponentPopupBuilder setCancelKeyEnabled(boolean enabled);
@NotNull ComponentPopupBuilder setMinSize(Dimension minSize);
@NotNull
ComponentPopupBuilder setLocateByContent(boolean byContent);
@NotNull ComponentPopupBuilder setAlpha(float alpha);
@NotNull
ComponentPopupBuilder setLocateWithinScreenBounds(boolean within);
@NotNull ComponentPopupBuilder setBelongsToGlobalPopupStack(boolean isInStack);
@NotNull
ComponentPopupBuilder setMinSize(Dimension minSize);
@NotNull ComponentPopupBuilder setProject(Project project);
@NotNull
ComponentPopupBuilder setAlpha(float alpha);
@NotNull ComponentPopupBuilder addUserData(Object object);
@NotNull
ComponentPopupBuilder setBelongsToGlobalPopupStack(boolean isInStack);
@NotNull ComponentPopupBuilder setModalContext(boolean modal);
@NotNull
ComponentPopupBuilder setProject(Project project);
@NotNull
ComponentPopupBuilder addUserData(Object object);
@NotNull
ComponentPopupBuilder setModalContext(boolean modal);
@NotNull
ComponentPopupBuilder setFocusOwners(@NotNull Component[] focusOwners);
/**
* Adds "advertising" text to the bottom (e.g.: hints in code completion popup).
*
* @param text Text to set.
* @return This.
*/
@NotNull
ComponentPopupBuilder setAdText(@Nullable String text);
@@ -124,7 +123,8 @@ public interface ComponentPopupBuilder {
@NotNull
ComponentPopupBuilder setAdText(@Nullable String text, int textAlignment);
@NotNull ComponentPopupBuilder setShowShadow(boolean show);
@NotNull
ComponentPopupBuilder setShowShadow(boolean show);
@NotNull
ComponentPopupBuilder setCommandButton(@NotNull ActiveComponent commandButton);
@@ -144,11 +144,11 @@ public interface ComponentPopupBuilder {
ComponentPopupBuilder setCancelOnWindowDeactivation(boolean cancelOnWindowDeactivation);
/**
* Allows to define custom strategy for processing {@link JBPopup#dispatchKeyEvent(KeyEvent)}
*
* @param handler strategy to use
* @return <code>this</code>
* Allows to define custom strategy for processing {@link JBPopup#dispatchKeyEvent(KeyEvent)}.
*/
@NotNull
ComponentPopupBuilder setKeyEventHandler(@NotNull BooleanFunction<KeyEvent> handler);
@NotNull
ComponentPopupBuilder setShowBorder(boolean show);
}
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2011 JetBrains s.r.o.
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -21,32 +21,34 @@ import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.CommonDataKeys;
import com.intellij.openapi.application.ApplicationNamesInfo;
import com.intellij.openapi.project.DumbAware;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.SystemInfo;
import com.intellij.openapi.wm.WindowManager;
import org.jetbrains.annotations.Nullable;
import java.awt.*;
public class AboutAction extends AnAction implements DumbAware {
@Override
public void update(AnActionEvent e) {
e.getPresentation().setVisible(!SystemInfo.isMacSystemMenu);
e.getPresentation().setDescription("Show information about " + ApplicationNamesInfo.getInstance().getFullProductName());
}
@Override
public void actionPerformed(AnActionEvent e) {
Window window = WindowManager.getInstance().suggestParentWindow(e.getData(CommonDataKeys.PROJECT));
Project project = e.getData(CommonDataKeys.PROJECT);
Window window = WindowManager.getInstance().suggestParentWindow(project);
showAboutDialog(window);
}
public static void showAbout() {
Window window = WindowManager.getInstance().suggestParentWindow(
CommonDataKeys.PROJECT.getData(DataManager.getInstance().getDataContext()));
@SuppressWarnings("deprecation") Project project = CommonDataKeys.PROJECT.getData(DataManager.getInstance().getDataContext());
Window window = WindowManager.getInstance().suggestParentWindow(project);
showAboutDialog(window);
}
private static void showAboutDialog(Window window) {
new AboutDialog(window).setVisible(true);
private static void showAboutDialog(@Nullable Window window) {
new AboutPopup().show(window);
}
}
@@ -24,22 +24,23 @@ import com.intellij.openapi.application.ex.ApplicationInfoEx;
import com.intellij.openapi.application.impl.ApplicationInfoImpl;
import com.intellij.openapi.ide.CopyPasteManager;
import com.intellij.openapi.project.DumbAwareAction;
import com.intellij.openapi.ui.popup.JBPopupFactory;
import com.intellij.openapi.util.IconLoader;
import com.intellij.openapi.util.Ref;
import com.intellij.openapi.util.SystemInfo;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.openapi.wm.IdeFocusManager;
import com.intellij.ui.ClickListener;
import com.intellij.ui.LicensingFacade;
import com.intellij.ui.UI;
import com.intellij.ui.awt.RelativePoint;
import com.intellij.util.text.DateFormatUtil;
import com.intellij.util.ui.UIUtil;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import javax.swing.*;
import java.awt.*;
import java.awt.datatransfer.StringSelection;
import java.awt.event.*;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.MouseMotionAdapter;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
@@ -49,137 +50,93 @@ import java.util.Properties;
/**
* @author Konstantin Bulenkov
*/
@SuppressWarnings("SSBasedInspection")
public class AboutDialog extends JDialog {
public AboutDialog(Window owner) {
super(owner);
init(owner);
}
private void init(Window window) {
public class AboutPopup {
public void show(@Nullable Window window) {
ApplicationInfoEx appInfo = (ApplicationInfoEx)ApplicationInfo.getInstance();
JPanel mainPanel = new JPanel(new BorderLayout());
mainPanel.setFocusable(true); //doesn't work under Oracle 1.7 if nothing focusable
final JComponent closeListenerOwner;
JPanel panel = new JPanel(new BorderLayout());
Icon image = IconLoader.getIcon(appInfo.getAboutImageUrl());
final InfoSurface infoSurface;
if (appInfo.showLicenseeInfo()) {
infoSurface = new InfoSurface(image);
final InfoSurface infoSurface = new InfoSurface(image);
infoSurface.setPreferredSize(new Dimension(image.getIconWidth(), image.getIconHeight()));
mainPanel.add(infoSurface, BorderLayout.NORTH);
panel.add(infoSurface, BorderLayout.NORTH);
closeListenerOwner = infoSurface;
}
else {
infoSurface = null;
mainPanel.add(new JLabel(image), BorderLayout.NORTH);
closeListenerOwner = mainPanel;
}
setUndecorated(true);
setContentPane(mainPanel);
final Ref<Long> showTime = Ref.create(System.currentTimeMillis());
new DumbAwareAction() {
@Override
public void actionPerformed(AnActionEvent e) {
if (infoSurface != null) {
new DumbAwareAction() {
@Override
public void actionPerformed(AnActionEvent e) {
copyInfoToClipboard(infoSurface.getText());
}
}
}.registerCustomShortcutSet(CustomShortcutSet.fromString("meta C", "control C"), mainPanel);
}.registerCustomShortcutSet(CustomShortcutSet.fromString("meta C", "control C"), panel);
}
else {
panel.add(new JLabel(image), BorderLayout.NORTH);
}
new DumbAwareAction() {
RelativePoint location;
if (window != null) {
Rectangle r = window.getBounds();
location = new RelativePoint(window, new Point((r.width - image.getIconWidth()) / 2, (r.height - image.getIconHeight()) / 2));
}
else {
Rectangle r = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().getDefaultConfiguration().getBounds();
location = new RelativePoint(new Point((r.width - image.getIconWidth()) / 2, (r.height - image.getIconHeight()) / 2));
}
@Override
public void actionPerformed(AnActionEvent e) {
dispose();
}
}.registerCustomShortcutSet(CustomShortcutSet.fromString("ESCAPE"), mainPanel);
//final long delta = Patches.APPLE_BUG_ID_3716865 ? 100 : 0;
final long delta = 500; //reproducible on Windows too
addWindowFocusListener(new WindowFocusListener() {
public void windowGainedFocus(WindowEvent e) {
}
public void windowLostFocus(WindowEvent e) {
if (e.getOppositeWindow() == null) return;
long eventTime = System.currentTimeMillis();
if (eventTime - showTime.get() > delta && e.getOppositeWindow() != e.getWindow()) {
dispose();
}
else {
IdeFocusManager.getGlobalInstance().requestFocus(AboutDialog.this, true);
}
}
});
new ClickListener() {
@Override
public boolean onClick(@NotNull MouseEvent event, int clickCount) {
dispose();
return true;
}
}.installOn(closeListenerOwner);
pack();
setLocationRelativeTo(window);
JBPopupFactory.getInstance().createComponentPopupBuilder(panel, panel)
.setRequestFocus(true)
.setFocusable(true)
.setResizable(false)
.setMovable(false)
.setModalContext(false)
.setShowShadow(true)
.setShowBorder(false)
.setCancelKeyEnabled(true)
.setCancelOnClickOutside(true)
.setCancelOnOtherWindowOpen(true)
.createPopup()
.show(location);
}
private static void copyInfoToClipboard(String text) {
try {
CopyPasteManager.getInstance().setContents(new StringSelection(text));
}
catch (Exception ignore) {
}
catch (Exception ignore) { }
}
private static class InfoSurface extends JPanel {
final Color col;
final Color linkCol;
private final Color myColor;
private final Color myLinkColor;
private final Icon myImage;
private Font myFont;
private Font myBoldFont;
private final List<AboutBoxLine> myLines = new ArrayList<AboutBoxLine>();
private StringBuilder myInfo = new StringBuilder();
private static class Link {
private final Rectangle rectangle;
private final String url;
private Link(Rectangle rectangle, String url) {
this.rectangle = rectangle;
this.url = url;
}
}
private final List<Link> myLinks = new ArrayList<Link>();
private Link myActiveLink;
private final List<Link> myLinks = new ArrayList<Link>();
public InfoSurface(Icon image) {
ApplicationInfoImpl appInfo = (ApplicationInfoImpl)ApplicationInfoEx.getInstanceEx();
myImage = image;
//noinspection UseJBColor
myColor = Color.white;
myLinkColor = appInfo.getAboutLinkColor() != null ? appInfo.getAboutLinkColor() : UI.getColor("link.foreground");
setOpaque(false);
col = Color.white;
final ApplicationInfoImpl ideInfo = (ApplicationInfoImpl)ApplicationInfoEx.getInstanceEx();
linkCol = ideInfo.getAboutLinkColor() != null ? ideInfo.getAboutLinkColor() : UI.getColor("link.foreground");
setBackground(col);
Calendar cal = ideInfo.getBuildDate();
myLines.add(new AboutBoxLine(ideInfo.getFullApplicationName(), true, null));
setBackground(myColor);
Calendar cal = appInfo.getBuildDate();
myLines.add(new AboutBoxLine(appInfo.getFullApplicationName(), true, null));
appendLast();
String buildInfo = IdeBundle.message("aboutbox.build.number", ideInfo.getBuild().asString());
String buildInfo = IdeBundle.message("about.box.build.number", appInfo.getBuild().asString());
String buildDate = "";
if (ideInfo.getBuild().isSnapshot()) {
if (appInfo.getBuild().isSnapshot()) {
buildDate = new SimpleDateFormat("HH:mm, ").format(cal.getTime());
}
buildDate += DateFormatUtil.formatAboutDialogDate(cal.getTime());
buildInfo += IdeBundle.message("aboutbox.build.date", buildDate);
buildInfo += IdeBundle.message("about.box.build.date", buildDate);
myLines.add(new AboutBoxLine(buildInfo));
appendLast();
@@ -192,23 +149,21 @@ public class AboutDialog extends JDialog {
myLines.add(new AboutBoxLine(message));
}
}
myLines.add(new AboutBoxLine(""));
final Properties properties = System.getProperties();
final String javaVersion = properties.getProperty("java.runtime.version", properties.getProperty("java.version", "unknown"));
final String arch = properties.getProperty("os.arch", "");
myLines.add(new AboutBoxLine(IdeBundle.message("aboutbox.jdk", javaVersion, arch), true, null));
appendLast();
myLines.add(new AboutBoxLine(IdeBundle.message("aboutbox.vm", properties.getProperty("java.vm.name", "unknown"),
properties.getProperty("java.vendor", "unknown"))));
Properties properties = System.getProperties();
String javaVersion = properties.getProperty("java.runtime.version", properties.getProperty("java.version", "unknown"));
String arch = properties.getProperty("os.arch", "");
myLines.add(new AboutBoxLine(IdeBundle.message("about.box.jre", javaVersion, arch)));
appendLast();
/*
myLines.add(new AboutBoxLine(""));
myLines.add(new AboutBoxLine(info.getCompanyURL(), true, info.getCompanyURL()));
*/
String vmVersion = properties.getProperty("java.vm.name", "unknown");
String vmVendor = properties.getProperty("java.vendor", "unknown");
myLines.add(new AboutBoxLine(IdeBundle.message("about.box.vm", vmVersion, vmVendor)));
appendLast();
String thirdParty = ideInfo.getThirdPartySoftwareURL();
String thirdParty = appInfo.getThirdPartySoftwareURL();
if (thirdParty != null) {
myLines.add(new AboutBoxLine(""));
myLines.add(new AboutBoxLine(""));
@@ -217,19 +172,22 @@ public class AboutDialog extends JDialog {
}
addMouseListener(new MouseAdapter() {
@Override
public void mousePressed(MouseEvent event) {
if (myActiveLink != null) {
event.consume();
BrowserUtil.browse(myActiveLink.url);
BrowserUtil.browse(myActiveLink.myUrl);
}
}
});
addMouseMotionListener(new MouseMotionAdapter() {
@Override
public void mouseMoved(MouseEvent event) {
boolean hadLink = (myActiveLink != null);
myActiveLink = null;
for (Link link : myLinks) {
if (link.rectangle.contains(event.getPoint())) {
if (link.myRectangle.contains(event.getPoint())) {
myActiveLink = link;
if (!hadLink) {
setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
@@ -251,6 +209,7 @@ public class AboutDialog extends JDialog {
@Override
protected void paintChildren(Graphics g) {
super.paintChildren(g);
Graphics2D g2 = (Graphics2D)g;
UIUtil.applyRenderingHints(g);
@@ -258,12 +217,13 @@ public class AboutDialog extends JDialog {
if (SystemInfo.isWindows) {
labelFont = new Font("Tahoma", Font.PLAIN, 12);
}
for (int labelSize = 10; labelSize != 6; labelSize -= 1) {
myLinks.clear();
g2.setPaint(col);
g2.setPaint(myColor);
myImage.paintIcon(this, g2, 0, 0);
g2.setColor(col);
g2.setColor(myColor);
TextRenderer renderer = new TextRenderer(0, 165, 398, 120, g2);
UIUtil.setupComposite(g2);
myFont = labelFont.deriveFont(Font.PLAIN, labelSize);
@@ -272,8 +232,7 @@ public class AboutDialog extends JDialog {
renderer.render(30, 0, myLines);
break;
}
catch (TextRenderer.OverflowException ignore) {
}
catch (TextRenderer.OverflowException ignore) { }
}
ApplicationInfo appInfo = ApplicationInfo.getInstance();
@@ -287,7 +246,7 @@ public class AboutDialog extends JDialog {
return myInfo.toString();
}
public class TextRenderer {
private class TextRenderer {
private final int xBase;
private final int yBase;
private final int w;
@@ -301,8 +260,7 @@ public class AboutDialog extends JDialog {
private int fontHeight;
private Font font;
public class OverflowException extends Exception {
}
public class OverflowException extends Exception { }
public TextRenderer(final int xBase, final int yBase, final int w, final int h, final Graphics2D g2) {
this.xBase = xBase;
@@ -324,7 +282,7 @@ public class AboutDialog extends JDialog {
final String s = line.getText();
setFont(line.isBold() ? myBoldFont : myFont);
if (line.getUrl() != null) {
g2.setColor(linkCol);
g2.setColor(myLinkColor);
FontMetrics metrics = g2.getFontMetrics(font);
myLinks.add(new Link(new Rectangle(x, yBase + y - fontAscent, metrics.stringWidth(s), fontHeight), line.getUrl()));
}
@@ -390,45 +348,55 @@ public class AboutDialog extends JDialog {
fontHeight = fontmetrics.getHeight();
}
}
}
private static class AboutBoxLine {
private final String myText;
private final boolean myBold;
private final String myUrl;
private boolean myKeepWithNext;
private static class AboutBoxLine {
private final String myText;
private final boolean myBold;
private final String myUrl;
private boolean myKeepWithNext;
public AboutBoxLine(final String text, final boolean bold, final String url) {
myText = text;
myBold = bold;
myUrl = url;
public AboutBoxLine(final String text, final boolean bold, final String url) {
myText = text;
myBold = bold;
myUrl = url;
}
public AboutBoxLine(final String text) {
myText = text;
myBold = false;
myUrl = null;
}
public String getText() {
return myText;
}
public boolean isBold() {
return myBold;
}
public String getUrl() {
return myUrl;
}
public boolean isKeepWithNext() {
return myKeepWithNext;
}
public AboutBoxLine keepWithNext() {
myKeepWithNext = true;
return this;
}
}
public AboutBoxLine(final String text) {
myText = text;
myBold = false;
myUrl = null;
}
private static class Link {
private final Rectangle myRectangle;
private final String myUrl;
public String getText() {
return myText;
}
public boolean isBold() {
return myBold;
}
public String getUrl() {
return myUrl;
}
public boolean isKeepWithNext() {
return myKeepWithNext;
}
public AboutBoxLine keepWithNext() {
myKeepWithNext = true;
return this;
private Link(Rectangle rectangle, String url) {
myRectangle = rectangle;
myUrl = url;
}
}
}
}
@@ -818,7 +818,7 @@ public class ApplicationImpl extends PlatformComponentManagerImpl implements App
}
int exitCode = 0;
if (restart) {
if (restart && Restarter.isSupported()) {
try {
exitCode = Restarter.scheduleRestart();
}
@@ -1026,7 +1026,8 @@ public class ApplicationImpl extends PlatformComponentManagerImpl implements App
if (myHeadlessMode) return;
if (!isReadAccessAllowed()) {
LOG.error(
"Read access is allowed from event dispatch thread or inside read-action only (see com.intellij.openapi.application.Application.runReadAction())",
"Read access is allowed from event dispatch thread or inside read-action only" +
" (see com.intellij.openapi.application.Application.runReadAction())",
"Current thread: " + describe(Thread.currentThread()), "Our dispatch thread:" + describe(ourDispatchThread),
"SystemEventQueueThread: " + describe(getEventQueueThread()));
}
@@ -154,14 +154,14 @@ public class IdeMenuBar extends JMenuBar implements IdeEventQueue.EventDispatche
@Override
public void doLayout() {
super.doLayout();
if (myClockPanel != null) {
if (myClockPanel != null && myButton != null) {
if (myState != State.EXPANDED) {
myClockPanel.setVisible(true);
myButton.setVisible(true);
Dimension preferredSize = myClockPanel.getPreferredSize();
myClockPanel.setBounds(getBounds().width - preferredSize.width, 0, preferredSize.width, preferredSize.height);
preferredSize = myButton.getPreferredSize();
myButton.setBounds(getBounds().width - preferredSize.width * 2 - myClockPanel.getWidth(), 0, preferredSize.width, preferredSize.height);
Dimension preferredSize = myButton.getPreferredSize();
myButton.setBounds(getBounds().width - preferredSize.width, 0, preferredSize.width, preferredSize.height);
preferredSize = myClockPanel.getPreferredSize();
myClockPanel.setBounds(getBounds().width - preferredSize.width - myButton.getWidth(), 0, preferredSize.width, preferredSize.height);
}
else {
myClockPanel.setVisible(false);
@@ -16,25 +16,18 @@
package com.intellij.ui.messages;
import com.intellij.icons.AllIcons;
import com.intellij.openapi.application.PathManager;
import com.intellij.openapi.application.ex.ApplicationInfoEx;
import com.intellij.openapi.ui.DialogWrapper;
import com.intellij.ui.AppUIUtil;
import com.intellij.ui.Gray;
import com.intellij.ui.JBColor;
import com.intellij.util.ui.UIUtil;
import org.jdesktop.swingx.graphics.GraphicsUtilities;
import org.jdesktop.swingx.graphics.ShadowRenderer;
import javax.imageio.ImageIO;
import javax.swing.*;
import javax.swing.plaf.UIResource;
import java.awt.*;
import java.awt.event.*;
import java.awt.geom.Rectangle2D;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
/**
* Created by Denis Fokin
@@ -260,7 +253,7 @@ public class SheetController {
recalculateShadow();
sheetPanel.setSize(SHEET_NC_WIDTH, SHEET_NC_HEIGHT );
sheetPanel.setSize(SHEET_NC_WIDTH + 200, SHEET_NC_HEIGHT + 200);
return sheetPanel;
}
@@ -281,14 +274,16 @@ public class SheetController {
private void paintShadow(Graphics2D g2d) {
if (myOffscreenShadowImage.getWidth() != SHEET_NC_WIDTH || myOffscreenShadowImage.getHeight() != SHEET_HEIGHT) {
myOffscreenShadowImage = GraphicsUtilities.createCompatibleTranslucentImage(
SHEET_WIDTH, SHEET_HEIGHT);
if (myOffscreenShadowImage.getWidth() != SHEET_WIDTH || myOffscreenShadowImage.getHeight() != SHEET_HEIGHT) {
myOffscreenShadowImage = new BufferedImage(SHEET_WIDTH, SHEET_HEIGHT, BufferedImage.TYPE_INT_ARGB);
}
g2d.setBackground(new JBColor(new Color(255, 255, 255, 0), new Color(110, 110, 110, 0)));
g2d.clearRect(0, 0, SHEET_NC_WIDTH, SHEET_NC_HEIGHT);
Graphics2D g2 = myOffscreenShadowImage.createGraphics();
g2.setColor(new JBColor(Gray._255, Gray._0));
g2.fillRoundRect(0, 0, SHEET_WIDTH - 1, SHEET_HEIGHT - 1, SHADOW_BORDER, SHADOW_BORDER);
g2.fillRect(0, 0, SHEET_WIDTH, SHEET_HEIGHT);
g2.dispose();
ShadowRenderer renderer = new ShadowRenderer();
@@ -296,9 +291,9 @@ public class SheetController {
renderer.setOpacity(.95f);
renderer.setColor(new JBColor(JBColor.BLACK, Gray._10));
BufferedImage shadow = renderer.createShadow(myOffscreenShadowImage);
g2d.drawImage(shadow, 0, - SHADOW_BORDER, null);
g2d.setBackground(new JBColor(new Color(255, 255, 255, 0), new Color(110, 110, 110, 0)));
g2d.clearRect(SHADOW_BORDER, 0, SHEET_WIDTH, SHEET_HEIGHT);
g2d.drawImage(shadow, 0, -SHADOW_BORDER, null);
//g2d.setBackground(new JBColor(new Color(255, 255, 255, 0), new Color(110, 110, 110, 0)));
//g2d.clearRect(SHADOW_BORDER, 0, SHEET_WIDTH, SHEET_HEIGHT);
}
private void layoutButtons(final JButton[] buttons, JPanel panel) {
@@ -347,9 +342,13 @@ public class SheetController {
myOffScreenFrame.add(mySheetPanel);
myOffScreenFrame.getRootPane().setDefaultButton(myDefaultButton);
final BufferedImage image = UIUtil.createImage(SHEET_NC_WIDTH, SHEET_NC_HEIGHT, BufferedImage.TYPE_INT_ARGB);
final BufferedImage image = new BufferedImage(SHEET_NC_WIDTH, SHEET_NC_HEIGHT, BufferedImage.TYPE_INT_ARGB);
Graphics g = image.createGraphics();
mySheetPanel.paint(g);
g.dispose();
mySheetPanel.paint(image.createGraphics());
myOffScreenFrame.dispose();
return image;
}
@@ -105,6 +105,9 @@ public class SheetMessage {
if (staticImage != null) {
Graphics2D g2d = (Graphics2D) g.create();
g2d.setBackground(new JBColor(new Color(255, 255, 255, 0), new Color(110, 110, 110, 0)));
g2d.clearRect(0, 0, myController.SHEET_NC_WIDTH, myController.SHEET_NC_HEIGHT);
g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.95f));
int imageCropOffset = (UIUtil.isRetina()) ? imageHeight * 2 : imageHeight;
@@ -57,20 +57,19 @@ import javax.swing.*;
import javax.swing.border.EmptyBorder;
import java.awt.*;
import java.awt.event.*;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
public class AbstractPopup implements JBPopup {
public static final String SHOW_HINTS = "ShowHints";
private static final Logger LOG = Logger.getInstance("#com.intellij.ui.popup.AbstractPopup");
private static final Object SUPPRESS_MAC_CORNER = new Object();
@NonNls public static final String SHOW_HINTS = "ShowHints";
/**
* X server sometimes focuses focusable popups upon appearance, ignoring the fact that we didn't ask to focus them
*/
private static final boolean ourXWindowIDEA94683FocusBug = SystemInfo.isXWindow;
// X server sometimes focuses focusable popups upon appearance, ignoring the fact that we didn't ask to focus them (IDEA-94683)
private static final boolean X_WINDOW_FOCUS_BUG = SystemInfo.isXWindow;
private PopupComponent myPopup;
private MyContentPanel myContent;
@@ -99,9 +98,8 @@ public class AbstractPopup implements JBPopup {
private boolean myLocateByContent;
protected FocusTrackback myFocusTrackback;
private Dimension myMinSize;
private ArrayList<Object> myUserData;
private List<Object> myUserData;
private boolean myShadowed;
private boolean myPaintShadow;
private float myAlpha = 0;
private float myLastAlpha = 0;
@@ -164,32 +162,30 @@ public class AbstractPopup implements JBPopup {
private UiActivity myActivityKey;
private Disposable myProjectDisposable;
AbstractPopup() {
}
AbstractPopup() { }
AbstractPopup init(final Project project,
@NotNull final JComponent component,
@Nullable final JComponent preferredFocusedComponent,
final boolean requestFocus,
final boolean focusable,
final boolean forceHeavyweight,
final boolean movable,
final String dimensionServiceKey,
final boolean resizable,
@Nullable final String caption,
@Nullable final Computable<Boolean> callback,
final boolean cancelOnClickOutside,
@Nullable final Set<JBPopupListener> listeners,
final boolean useDimServiceForXYLocation,
AbstractPopup init(Project project,
@NotNull JComponent component,
@Nullable JComponent preferredFocusedComponent,
boolean requestFocus,
boolean focusable,
boolean movable,
String dimensionServiceKey,
boolean resizable,
@Nullable String caption,
@Nullable Computable<Boolean> callback,
boolean cancelOnClickOutside,
@Nullable Set<JBPopupListener> listeners,
boolean useDimServiceForXYLocation,
ActiveComponent commandButton,
@Nullable final IconButton cancelButton,
@Nullable final MouseChecker cancelOnMouseOutCallback,
final boolean cancelOnWindow,
@Nullable final ActiveIcon titleIcon,
final boolean cancelKeyEnabled,
final boolean locateBycontent,
final boolean placeWithinScreenBounds,
@Nullable final Dimension minSize,
@Nullable IconButton cancelButton,
@Nullable MouseChecker cancelOnMouseOutCallback,
boolean cancelOnWindow,
@Nullable ActiveIcon titleIcon,
boolean cancelKeyEnabled,
boolean locateByContent,
boolean placeWithinScreenBounds,
@Nullable Dimension minSize,
float alpha,
@Nullable MaskProvider maskProvider,
boolean inStack,
@@ -197,25 +193,25 @@ public class AbstractPopup implements JBPopup {
@Nullable Component[] focusOwners,
@Nullable String adText,
int adTextAlignment,
final boolean headerAlwaysFocusable,
boolean headerAlwaysFocusable,
@NotNull List<Pair<ActionListener, KeyStroke>> keyboardActions,
Component settingsButtons,
@Nullable final Processor<JBPopup> pinCallback,
boolean mayBeParent,
boolean showShadow,
boolean showBorder,
boolean cancelOnWindowDeactivation,
@Nullable BooleanFunction<KeyEvent> keyEventHandler)
{
if (requestFocus && !focusable) {
assert false : "Incorrect argument combination: requestFocus=" + requestFocus + " focusable=" + focusable;
assert false : "Incorrect argument combination: requestFocus=true focusable=false";
}
myActivityKey = new UiActivity.Focus("Popup:" + this);
myProject = project;
myComponent = component;
myPopupBorder = PopupBorder.Factory.create(true, showShadow);
myPopupBorder = showBorder ? PopupBorder.Factory.create(true, showShadow) : PopupBorder.Factory.createEmpty();
myShadowed = showShadow;
myPaintShadow = showShadow && !SystemInfo.isMac && !movable && !resizable && Registry.is("ide.popup.dropShadow");
myContent = createContentPanel(resizable, myPopupBorder, isToDrawMacCorner() && resizable);
myMayBeParent = mayBeParent;
myCancelOnWindowDeactivation = cancelOnWindowDeactivation;
@@ -226,7 +222,7 @@ public class AbstractPopup implements JBPopup {
}
myCancelKeyEnabled = cancelKeyEnabled;
myLocateByContent = locateBycontent;
myLocateByContent = locateByContent;
myLocateWithinScreen = placeWithinScreenBounds;
myAlpha = alpha;
myMaskProvider = maskProvider;
@@ -250,15 +246,15 @@ public class AbstractPopup implements JBPopup {
}
if (pinCallback != null) {
myCaption.setButtonComponent(new InplaceButton(new IconButton("Pin", AllIcons.General.AutohideOff,
AllIcons.General.AutohideOff,
AllIcons.General.AutohideOffInactive),
new ActionListener() {
@Override
public void actionPerformed(final ActionEvent e) {
pinCallback.process(AbstractPopup.this);
}
}));
myCaption.setButtonComponent(new InplaceButton(
new IconButton("Pin", AllIcons.General.AutohideOff, AllIcons.General.AutohideOff, AllIcons.General.AutohideOffInactive),
new ActionListener() {
@Override
public void actionPerformed(final ActionEvent e) {
pinCallback.process(AbstractPopup.this);
}
}
));
}
else if (cancelButton != null) {
myCaption.setButtonComponent(new InplaceButton(cancelButton, new ActionListener() {
@@ -867,6 +863,7 @@ public class AbstractPopup implements JBPopup {
};
if (myNativePopup) {
final FocusRequestor furtherRequestor = getFocusManager().getFurtherRequestor();
//noinspection SSBasedInspection
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
@@ -919,7 +916,7 @@ public class AbstractPopup implements JBPopup {
return;
}
if (ourXWindowIDEA94683FocusBug && !myRequestFocus && prevOwner != null &&
if (X_WINDOW_FOCUS_BUG && !myRequestFocus && prevOwner != null &&
Registry.is("actionSystem.xWindow.remove.focus.from.nonFocusable.popups")) {
new Alarm().addRequest(new Runnable() {
@Override
@@ -1242,17 +1239,18 @@ public class AbstractPopup implements JBPopup {
resetWindow();
if (myFinalRunnable != null) {
final ActionCallback typeaheadDone = new ActionCallback();
final ActionCallback typeAheadDone = new ActionCallback();
Runnable runFinal = new Runnable() {
@Override
public void run() {
SwingUtilities.invokeLater(typeaheadDone.createSetDoneRunnable());
//noinspection SSBasedInspection
SwingUtilities.invokeLater(typeAheadDone.createSetDoneRunnable());
myFinalRunnable.run();
myFinalRunnable = null;
}
};
IdeFocusManager.getInstance(myProject).typeAheadUntil(typeaheadDone);
IdeFocusManager.getInstance(myProject).typeAheadUntil(typeAheadDone);
getFocusManager().doWhenFocusSettlesDown(runFinal);
}
}
@@ -1338,12 +1336,7 @@ public class AbstractPopup implements JBPopup {
return myCancelOnWindowDeactivation;
}
public void setCancelOnWindowDeactivation(boolean cancelOnWindowDeactivation) {
myCancelOnWindowDeactivation = cancelOnWindowDeactivation;
}
private class Canceller implements AWTEventListener {
private boolean myEverEntered = false;
@Override
@@ -1525,7 +1518,7 @@ public class AbstractPopup implements JBPopup {
return myPopup.getWindow();
}
public void setUserData(ArrayList<Object> userData) {
public void setUserData(List<Object> userData) {
myUserData = userData;
}
@@ -1534,8 +1527,8 @@ public class AbstractPopup implements JBPopup {
if (myUserData != null) {
for (Object o : myUserData) {
if (userDataClass.isInstance(o)) {
//noinspection unchecked
return (T)o;
@SuppressWarnings("unchecked") T t = (T)o;
return t;
}
}
}
@@ -1672,10 +1665,6 @@ public class AbstractPopup implements JBPopup {
}
}
public Runnable getFinalRunnable() {
return myFinalRunnable;
}
@Override
public void setFinalRunnable(Runnable finalRunnable) {
myFinalRunnable = finalRunnable;
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,7 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.intellij.ui.popup;
import com.intellij.openapi.application.ApplicationManager;
@@ -38,8 +37,8 @@ import java.util.*;
import java.util.List;
/**
* User: anna
* Date: 15-Mar-2006
* @author anna
* @since 15-Mar-2006
*/
public class ComponentPopupBuilderImpl implements ComponentPopupBuilder {
private String myTitle = "";
@@ -48,7 +47,6 @@ public class ComponentPopupBuilderImpl implements ComponentPopupBuilder {
private final JComponent myComponent;
private final JComponent myPreferredFocusedComponent;
private boolean myRequestFocus;
private boolean myForceHeavyweight;
private String myDimensionServiceKey = null;
private Computable<Boolean> myCallback = null;
private Project myProject;
@@ -63,12 +61,11 @@ public class ComponentPopupBuilderImpl implements ComponentPopupBuilder {
private ActiveIcon myTitleIcon = new ActiveIcon(EmptyIcon.ICON_0);
private boolean myCancelKeyEnabled = true;
private boolean myLocateByContent = false;
private boolean myPlacewithinScreen = true;
private boolean myPlaceWithinScreen = true;
private Processor<JBPopup> myPinCallback = null;
private Dimension myMinSize;
private MaskProvider myMaskProvider;
private float myAlpha;
private ArrayList<Object> myUserData;
private List<Object> myUserData;
private boolean myInStack = true;
private boolean myModalContext = true;
@@ -76,8 +73,8 @@ public class ComponentPopupBuilderImpl implements ComponentPopupBuilder {
private String myAd;
private boolean myShowShadow = true;
private boolean myShowBorder = true;
private boolean myFocusable = true;
private boolean myHeaderAlwaysFocusable;
private ActiveComponent myCommandButton;
private List<Pair<ActionListener, KeyStroke>> myKeyboardActions = Collections.emptyList();
private Component mySettingsButtons;
@@ -85,8 +82,7 @@ public class ComponentPopupBuilderImpl implements ComponentPopupBuilder {
private int myAdAlignment = SwingConstants.LEFT;
private BooleanFunction<KeyEvent> myKeyEventHandler;
public ComponentPopupBuilderImpl(@NotNull JComponent component,
final JComponent preferredFocusedComponent) {
public ComponentPopupBuilderImpl(@NotNull JComponent component, JComponent preferredFocusedComponent) {
myComponent = component;
myPreferredFocusedComponent = preferredFocusedComponent;
}
@@ -156,15 +152,8 @@ public class ComponentPopupBuilderImpl implements ComponentPopupBuilder {
@Override
@NotNull
public ComponentPopupBuilder setForceHeavyweight(final boolean forceHeavyweight) {
myForceHeavyweight = forceHeavyweight;
return this;
}
@Override
@NotNull
public ComponentPopupBuilder setDimensionServiceKey(final Project project, final String dimensionServiceKey, final boolean useForXYLocation) {
myDimensionServiceKey = dimensionServiceKey;
public ComponentPopupBuilder setDimensionServiceKey(final Project project, final String key, final boolean useForXYLocation) {
myDimensionServiceKey = key;
myUseDimServiceForXYLocation = useForXYLocation;
myProject = project;
return this;
@@ -227,7 +216,7 @@ public class ComponentPopupBuilderImpl implements ComponentPopupBuilder {
@NotNull
@Override
public ComponentPopupBuilder setKeyEventHandler(@NotNull BooleanFunction<KeyEvent> handler) {
myKeyEventHandler = handler;
myKeyEventHandler = handler;
return this;
}
@@ -241,18 +230,17 @@ public class ComponentPopupBuilderImpl implements ComponentPopupBuilder {
@Override
@NotNull
public JBPopup createPopup() {
final AbstractPopup popup = new AbstractPopup().init(myProject, myComponent, myPreferredFocusedComponent, myRequestFocus, myFocusable, myForceHeavyweight,
myMovable, myDimensionServiceKey, myResizable, myTitle,
myCallback, myCancelOnClickOutside, myListeners, myUseDimServiceForXYLocation, myCommandButton,
myCancelButton,
myCancelOnMouseOutCallback, myCancelOnWindow, myTitleIcon, myCancelKeyEnabled, myLocateByContent,
myPlacewithinScreen, myMinSize, myAlpha, myMaskProvider, myInStack, myModalContext, myFocusOwners, myAd, myAdAlignment,
myHeaderAlwaysFocusable, myKeyboardActions, mySettingsButtons, myPinCallback, myMayBeParent,
myShowShadow, myCancelOnWindowDeactivation, myKeyEventHandler);
AbstractPopup popup = new AbstractPopup().init(
myProject, myComponent, myPreferredFocusedComponent, myRequestFocus, myFocusable, myMovable, myDimensionServiceKey,
myResizable, myTitle, myCallback, myCancelOnClickOutside, myListeners, myUseDimServiceForXYLocation, myCommandButton,
myCancelButton, myCancelOnMouseOutCallback, myCancelOnWindow, myTitleIcon, myCancelKeyEnabled, myLocateByContent,
myPlaceWithinScreen, myMinSize, myAlpha, null, myInStack, myModalContext, myFocusOwners, myAd, myAdAlignment,
false, myKeyboardActions, mySettingsButtons, myPinCallback, myMayBeParent,
myShowShadow, myShowBorder, myCancelOnWindowDeactivation, myKeyEventHandler
);
if (myUserData != null) {
popup.setUserData(myUserData);
}
//default disposable parent
Disposer.register(ApplicationManager.getApplication(), popup);
return popup;
}
@@ -288,7 +276,7 @@ public class ComponentPopupBuilderImpl implements ComponentPopupBuilder {
@Override
@NotNull
public ComponentPopupBuilder setLocateWithinScreenBounds(final boolean within) {
myPlacewithinScreen = within;
myPlaceWithinScreen = within;
return this;
}
@@ -299,12 +287,6 @@ public class ComponentPopupBuilderImpl implements ComponentPopupBuilder {
return this;
}
@NotNull
public ComponentPopupBuilder setMaskProvider(MaskProvider maskProvider) {
myMaskProvider = maskProvider;
return this;
}
@Override
@NotNull
public ComponentPopupBuilder setAlpha(final float alpha) {
@@ -363,4 +345,11 @@ public class ComponentPopupBuilderImpl implements ComponentPopupBuilder {
myShowShadow = show;
return this;
}
@NotNull
@Override
public ComponentPopupBuilder setShowBorder(boolean show) {
myShowBorder = show;
return this;
}
}
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -89,10 +89,10 @@ public abstract class WizardPopup extends AbstractPopup implements ActionListene
scrollPane.setBorder(null);
final Project project = CommonDataKeys.PROJECT.getData(DataManager.getInstance().getDataContext());
init(project, scrollPane, getPreferredFocusableComponent(), true, true, true, true, null,
init(project, scrollPane, getPreferredFocusableComponent(), true, true, true, null,
false, aStep.getTitle(), null, true, null, false, null, null, null, false, null, true, false, true, null, 0f,
null, true, false, new Component[0], null, SwingConstants.LEFT, true, Collections.<Pair<ActionListener, KeyStroke>>emptyList(), null, null, false, true,
true, null);
null, true, false, new Component[0], null, SwingConstants.LEFT, true, Collections.<Pair<ActionListener, KeyStroke>>emptyList(),
null, null, false, true, true, true, null);
registerAction("disposeAll", KeyEvent.VK_ESCAPE, InputEvent.SHIFT_MASK, new AbstractAction() {
@Override
@@ -313,7 +313,7 @@ public abstract class WizardPopup extends AbstractPopup implements ActionListene
final Rectangle r = ScreenUtil.getScreenRectangle(locationOnScreen);
resultHeight = ofContent.height > r.height - (r.height / 4) ? r.height - (r.height / 4) : ofContent.height;
}
int resultWidth = ofContent.width > MAX_SIZE.width ? MAX_SIZE.width : ofContent.width;
if (ofContent.height > MAX_SIZE.height) {
@@ -269,11 +269,13 @@ message.educational.license=1-Year Educational License. {0}
message.open.source.project.license=Open Source Project License. {0}
message.non.commercial.use.only=Non-commercial use only
message.personal.license=Personal License
aboutbox.build.number=Build #{0}
aboutbox.build.date=, built on {0}
aboutbox.jdk=JRE : {0} {1}
aboutbox.vm=VM: {0} by {1}
aboutbox.maintenance.due=Entitled for free updates and upgrades until {0,date,MMMM dd, yyyy}
about.box.build.number=Build #{0}
about.box.build.date=, built on {0}
about.box.jre=JRE: {0} {1}
about.box.vm=JVM: {0} by {1}
about.box.maintenance.due=Entitled for free updates and upgrades until {0,date,MMMM dd, yyyy}
title.warning=Warning
message.upgrade.from.previous.required=Your license is not valid for use with this version of {0}. <br/> For information on how to upgrade your license please go to {1} <br/> You can also opt for a free time-limited evaluation.
title.upgrade.needed=License Upgrade Needed
@@ -332,6 +332,7 @@ git.new.log=true
diff.patience.alg=false
svn.use.terminal=false
svn.use.incoming.optimization=false
svn.check.repository.supports.merge.info=false
completion.enable.relevant.method.chain.suggestions=false
@@ -378,4 +379,4 @@ ide.scratch.enabled=false
editor.injected.highlighting.enabled=true
editor.injected.highlighting.enabled.description=Disables injected fragments highlighting (requires project reopening)
ui.no.mac.scrollbar=false
ui.no.mac.scrollbar=false
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2013 JetBrains s.r.o.
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,6 +16,7 @@
package com.intellij.ui;
import com.intellij.openapi.util.SystemInfo;
import org.jetbrains.annotations.NotNull;
import javax.swing.border.Border;
import java.awt.*;
@@ -25,24 +26,26 @@ public interface PopupBorder extends Border {
void setActive(boolean active);
class Factory {
private Factory() { }
private Factory() {
@NotNull
public static PopupBorder createEmpty() {
return new BaseBorder();
}
@NotNull
public static PopupBorder create(boolean active, boolean windowWithShadow) {
final BaseBorder border =
SystemInfo.isMac && windowWithShadow ? new BaseBorder() : new BaseBorder(true, CaptionPanel.getBorderColor(true), CaptionPanel.getBorderColor(false));
PopupBorder border = SystemInfo.isMac && windowWithShadow ?
createEmpty() : new BaseBorder(true, CaptionPanel.getBorderColor(true), CaptionPanel.getBorderColor(false));
border.setActive(active);
return border;
}
}
class BaseBorder implements PopupBorder {
private boolean myVisible;
private Color myActiveColor;
private Color myPassiveColor;
private final boolean myVisible;
private final Color myActiveColor;
private final Color myPassiveColor;
private boolean myActive;
protected BaseBorder() {
@@ -79,6 +82,4 @@ public interface PopupBorder extends Border {
return true;
}
}
}
@@ -242,21 +242,21 @@ public class UIUtil {
return ourRetina.get();
}
} else if (SystemInfo.isJavaVersionAtLeast("1.7.0_40") && SystemInfo.isOracleJvm) {
try {
GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment();
final GraphicsDevice device = env.getDefaultScreenDevice();
try {
Field field = device.getClass().getDeclaredField("scale");
if (field != null) {
field.setAccessible(true);
Object scale = field.get(device);
if (scale instanceof Integer && ((Integer)scale).intValue() == 2) {
ourRetina.set(true);
return true;
}
Field field = device.getClass().getDeclaredField("scale");
if (field != null) {
field.setAccessible(true);
Object scale = field.get(device);
if (scale instanceof Integer && ((Integer)scale).intValue() == 2) {
ourRetina.set(true);
return true;
}
}
catch (Exception ignore) {
}
}
catch (AWTError ignore) {}
catch (Exception ignore) {}
}
ourRetina.set(false);
}
@@ -16,6 +16,7 @@
package com.intellij.util.xmlb;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.util.JDOMUtil;
import com.intellij.openapi.util.io.StreamUtil;
import com.intellij.util.io.URLUtil;
@@ -32,6 +33,8 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class JDOMXIncluder {
private static final Logger LOG = Logger.getInstance(JDOMXIncluder.class);
@NonNls private static final String HTTP_WWW_W3_ORG_2001_XINCLUDE = "http://www.w3.org/2001/XInclude";
@NonNls private static final String XI = "xi";
@NonNls private static final String INCLUDE = "include";
@@ -49,7 +52,10 @@ public class JDOMXIncluder {
}
public static Document resolve(Document original, String base) throws XIncludeException {
return resolve(original, base, false);
}
public static Document resolve(Document original, String base, boolean ignoreMissing) throws XIncludeException {
if (original == null) {
throw new NullPointerException("Document must not be null");
}
@@ -57,7 +63,7 @@ public class JDOMXIncluder {
Document result = original.clone();
Element root = result.getRootElement();
List<Content> resolved = resolve(root, base);
List<Content> resolved = resolve(root, base, ignoreMissing);
// check that the list returned contains
// exactly one root element
@@ -132,10 +138,14 @@ public class JDOMXIncluder {
}
public static List<Content> resolve(@NotNull Element original, String base) throws XIncludeException {
return resolve(original, base, false);
}
private static List<Content> resolve(@NotNull Element original, String base, boolean ignoreMissing) throws XIncludeException {
Stack<String> bases = new Stack<String>();
if (base != null) bases.push(base);
List<Content> result = resolve(original, bases);
List<Content> result = resolve(original, bases, ignoreMissing);
bases.pop();
return result;
@@ -148,22 +158,22 @@ public class JDOMXIncluder {
return false;
}
protected static List<Content> resolve(Element original, Stack<String> bases) throws XIncludeException {
private static List<Content> resolve(Element original, Stack<String> bases, boolean ignoreMissing) throws XIncludeException {
if (!bases.isEmpty()) bases.peek();
if (isIncludeElement(original)) {
return resolveXIncludeElement(original, bases);
return resolveXIncludeElement(original, bases, ignoreMissing);
}
else {
Element resolvedElement = resolveNonXIncludeElement(original, bases);
Element resolvedElement = resolveNonXIncludeElement(original, bases, ignoreMissing);
List<Content> resultList = new ArrayList<Content>(1);
resultList.add(resolvedElement);
return resultList;
}
}
private static List<Content> resolveXIncludeElement(Element element, Stack<String> bases) throws XIncludeException {
private static List<Content> resolveXIncludeElement(Element element, Stack<String> bases, boolean ignoreMissing) throws XIncludeException {
String base = "";
if (!bases.isEmpty()) base = bases.peek();
@@ -212,7 +222,7 @@ public class JDOMXIncluder {
assert !bases.contains(remote.toExternalForm()) : "Circular XInclude Reference to " + remote.toExternalForm();
final Element fallbackElement = element.getChild("fallback", element.getNamespace());
List<Content> remoteParsed = parseRemote(bases, remote, fallbackElement);
List<Content> remoteParsed = parseRemote(bases, remote, fallbackElement, ignoreMissing);
if (!remoteParsed.isEmpty()) {
remoteParsed = extractNeededChildren(element, remoteParsed);
}
@@ -222,7 +232,7 @@ public class JDOMXIncluder {
if (o instanceof Element) {
Element e = (Element)o;
List<? extends Content> nodes = resolve(e, bases);
List<? extends Content> nodes = resolve(e, bases, ignoreMissing);
remoteParsed.addAll(i, nodes);
i += nodes.size();
remoteParsed.remove(i);
@@ -299,14 +309,17 @@ public class JDOMXIncluder {
}
@NotNull
private static List<Content> parseRemote(final Stack<String> bases, final URL remote, @Nullable Element fallbackElement) {
private static List<Content> parseRemote(Stack<String> bases,
URL remote,
@Nullable Element fallbackElement,
boolean ignoreMissing) {
try {
Document doc = JDOMUtil.loadResourceDocument(remote);
bases.push(remote.toExternalForm());
Element root = doc.getRootElement();
final List<Content> list = resolve(root, bases);
List<Content> list = resolve(root, bases, ignoreMissing);
bases.pop();
return list;
@@ -319,17 +332,19 @@ public class JDOMXIncluder {
// TODO[yole] return contents of fallback element (we don't have fallback elements with content ATM)
return Collections.emptyList();
}
if (ignoreMissing) {
LOG.info(remote.toExternalForm() + " include ignored: " + e.getMessage());
return Collections.emptyList();
}
throw new XIncludeException(e);
}
}
private static Element resolveNonXIncludeElement(Element original, Stack<String> bases) throws XIncludeException {
private static Element resolveNonXIncludeElement(Element original, Stack<String> bases, boolean ignoreMissing) throws XIncludeException {
if (!bases.isEmpty()) bases.peek();
Element result = new Element(original.getName(), original.getNamespace());
Iterator<Attribute> attributes = original.getAttributes().iterator();
while (attributes.hasNext()) {
Attribute a = attributes.next();
for (Attribute a : original.getAttributes()) {
result.setAttribute(a.clone());
}
@@ -337,10 +352,10 @@ public class JDOMXIncluder {
if (o instanceof Element) {
Element element = (Element)o;
if (isIncludeElement(element)) {
result.addContent(resolveXIncludeElement(element, bases));
result.addContent(resolveXIncludeElement(element, bases, ignoreMissing));
}
else {
result.addContent(resolveNonXIncludeElement(element, bases));
result.addContent(resolveNonXIncludeElement(element, bases, ignoreMissing));
}
}
else {
@@ -34,6 +34,7 @@ import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.util.Function;
import com.intellij.util.containers.ContainerUtil;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.io.*;
@@ -799,6 +800,7 @@ public class ChangesCacheFile {
private final Project myProject;
private final DiffProvider myDiffProvider;
private boolean myAnyChanges;
private long myIndexStreamCachedLength;
RefreshIncomingChangesOperation(ChangesCacheFile changesCacheFile, Project project, final DiffProvider diffProvider) {
myChangesCacheFile = changesCacheFile;
@@ -848,6 +850,7 @@ public class ChangesCacheFile {
Map<Pair<IncomingChangeListData, Change>, VirtualFile> revisionDependentFiles = ContainerUtil.newHashMap();
Map<Pair<IncomingChangeListData, Change>, ProcessingResult> results = ContainerUtil.newHashMap();
myIndexStreamCachedLength = myChangesCacheFile.myIndexStream.length();
// try to process changelists in a light way, remember which files need revisions
for(IncomingChangeListData data: list) {
debug("Checking incoming changelist " + data.changeList.getNumber());
@@ -864,11 +867,13 @@ public class ChangesCacheFile {
}
if (!revisionDependentFiles.isEmpty()) {
// lots of same files could be collected - make set of unique files
HashSet<VirtualFile> uniqueFiles = ContainerUtil.newHashSet(revisionDependentFiles.values());
// bulk-get all needed revisions at once
Map<VirtualFile, VcsRevisionNumber> revisions = myDiffProvider instanceof DiffProviderEx
? ((DiffProviderEx)myDiffProvider).getCurrentRevisions(revisionDependentFiles.values())
: DiffProviderEx.getCurrentRevisions(revisionDependentFiles.values(), myDiffProvider);
? ((DiffProviderEx)myDiffProvider).getCurrentRevisions(uniqueFiles)
: DiffProviderEx.getCurrentRevisions(uniqueFiles, myDiffProvider);
// perform processing requiring those revisions
for(IncomingChangeListData data: list) {
for (Change change : data.getChangesToProcess()) {
@@ -1061,25 +1066,18 @@ public class ChangesCacheFile {
private boolean wasSubsequentlyDeleted(final FilePath file, long indexOffset) {
try {
indexOffset += INDEX_ENTRY_SIZE;
while(indexOffset < myChangesCacheFile.myIndexStream.length()) {
while(indexOffset < myIndexStreamCachedLength) {
IndexEntry e = getIndexEntryAtOffset(indexOffset);
final CommittedChangeList changeList = getChangeListAtOffset(e.offset);
for(Change c: changeList.getChanges()) {
final ContentRevision beforeRevision = c.getBeforeRevision();
if ((beforeRevision != null) && (c.getAfterRevision() == null)) {
if (file.getIOFile().getAbsolutePath().equals(beforeRevision.getFile().getIOFile().getAbsolutePath()) ||
file.isUnder(beforeRevision.getFile(), false)) {
debug("Found subsequent deletion for file " + file);
if (isFileDeleted(file, beforeRevision.getFile())) {
return true;
}
} else if ((beforeRevision != null) && (c.getAfterRevision() != null)) {
boolean underBefore = file.isUnder(beforeRevision.getFile(), false);
if (underBefore && c.isIsReplaced() && (! file.equals(beforeRevision.getFile()))) {
debug("For " + file + "some of parents is replaced: " + beforeRevision.getFile());
return true;
} else if (underBefore && (c.isMoved() || c.isRenamed())) {
debug("For " + file + "some of parents was renamed/moved: " + beforeRevision.getFile());
if (isParentReplacedOrFileMoved(file, c, beforeRevision.getFile())) {
return true;
}
}
@@ -1093,6 +1091,33 @@ public class ChangesCacheFile {
return false;
}
private static boolean isParentReplacedOrFileMoved(@NotNull FilePath file, @NotNull Change change, @NotNull FilePath beforeFile) {
boolean isParentReplaced = change.isIsReplaced() && (!file.equals(beforeFile));
boolean isMovedRenamed = change.isMoved() || change.isRenamed();
// call FilePath.isUnder() only if change is either "parent replaced" or moved/renamed - as many calls to FilePath.isUnder()
// could take a lot of time
boolean underBefore = (isParentReplaced || isMovedRenamed) && file.isUnder(beforeFile, false);
if (underBefore && isParentReplaced) {
debug("For " + file + "some of parents is replaced: " + beforeFile);
return true;
}
else if (underBefore && isMovedRenamed) {
debug("For " + file + "some of parents was renamed/moved: " + beforeFile);
return true;
}
return false;
}
private static boolean isFileDeleted(@NotNull FilePath file, @NotNull FilePath beforeFile) {
if (file.getIOFile().getAbsolutePath().equals(beforeFile.getIOFile().getAbsolutePath()) ||
file.isUnder(beforeFile, false)) {
debug("Found subsequent deletion for file " + file);
return true;
}
return false;
}
private IndexEntry getIndexEntryAtOffset(final long indexOffset) throws IOException {
IndexEntry e = myIndexEntryCache.get(indexOffset);
if (e == null) {
@@ -93,8 +93,9 @@ public class VcsLogJoiner {
@NotNull Collection<Hash> newRefs) {
Set<Hash> allUnresolvedLinkedHashes = new HashSet<Hash>(newRefs);
allUnresolvedLinkedHashes.removeAll(previousRefs);
// in this moment allUnresolvedLinkedHashes contains only NEW refs
// at this moment allUnresolvedLinkedHashes contains only NEW refs
for (VcsCommit commit : firstBlock) {
allUnresolvedLinkedHashes.add(commit.getHash());
allUnresolvedLinkedHashes.addAll(commit.getParents());
}
for (VcsCommit commit : firstBlock) {
@@ -54,6 +54,39 @@ public class VcsLogJoinerTest {
);
}
@Test
public void oneNodeTest() {
runTest(
asList("3|-a1|-"),
asList("3|-a1|-"),
asList("a1"),
asList("a1"),
"a1"
);
}
@Test
public void oneNodeResetTest() {
runTest(
asList("3|-a1|-a2", "2|-a2|-"),
asList("2|-a2|-"),
asList("a2", "a1"),
asList("a2"),
"a2"
);
}
@Test
public void oneNodeReset2Test() {
runTest(
asList("3|-a1|-a2", "2|-a2|-"),
asList("2|-a2|-"),
asList("a1"),
asList("a2"),
"a2"
);
}
@Test
public void simpleRemoveCommitsTest() {
runTest(
@@ -144,7 +144,7 @@ def logConfigurationError(aTitle, aMessage, boolean openSettings) {
}
String escapeCdata(String s) {
return "<![CDATA[" + s.replaceAll("]]>", "]]]]><![CDATA[>")+ "]]>";
return "<![CDATA[" + s?.replaceAll("]]>", "]]]]><![CDATA[>")+ "]]>";
}
def getStackTrace(Throwable t) {
if(!t) return ''
@@ -1,6 +1,7 @@
package org.jetbrains.idea.svn.api;
import com.intellij.execution.ExecutionException;
import com.intellij.execution.configurations.EncodingEnvironmentUtil;
import com.intellij.execution.configurations.GeneralCommandLine;
import com.intellij.execution.process.CapturingProcessHandler;
import com.intellij.execution.process.ProcessOutput;
@@ -43,6 +44,8 @@ public class CmdVersionClient extends BaseSvnClient implements VersionClient {
commandLine.addParameter(SvnCommandName.version.getName());
commandLine.addParameter("--quiet");
EncodingEnvironmentUtil.fixDefaultEncodingIfMac(commandLine, null);
CapturingProcessHandler handler = new CapturingProcessHandler(commandLine.createProcess(), CharsetToolkit.getDefaultSystemCharset());
return handler.runProcess(30 * 1000);
}
@@ -19,12 +19,13 @@ package org.jetbrains.idea.svn.history;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.DefaultActionGroup;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.progress.ProcessCanceledException;
import com.intellij.openapi.progress.ProgressManager;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.Pair;
import com.intellij.openapi.util.ThrowableComputable;
import com.intellij.openapi.util.io.FileUtil;
import com.intellij.openapi.util.registry.Registry;
import com.intellij.openapi.vcs.*;
import com.intellij.openapi.vcs.changes.committed.DecoratorManager;
import com.intellij.openapi.vcs.changes.committed.VcsCommittedListsZipper;
@@ -39,19 +40,26 @@ import com.intellij.util.AsynchConsumer;
import com.intellij.util.Consumer;
import com.intellij.util.PairConsumer;
import com.intellij.util.ThrowableConsumer;
import com.intellij.util.containers.ContainerUtil;
import com.intellij.util.messages.MessageBusConnection;
import com.intellij.vcsUtil.VcsUtil;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.idea.svn.*;
import org.jetbrains.idea.svn.SvnBundle;
import org.jetbrains.idea.svn.SvnUtil;
import org.jetbrains.idea.svn.SvnVcs;
import org.jetbrains.idea.svn.actions.ConfigureBranchesAction;
import org.jetbrains.idea.svn.commandLine.SvnBindException;
import org.tmatesoft.svn.core.*;
import org.tmatesoft.svn.core.io.SVNRepository;
import org.tmatesoft.svn.core.wc.SVNLogClient;
import org.tmatesoft.svn.core.wc.ISVNStatusHandler;
import org.tmatesoft.svn.core.wc.SVNRevision;
import org.tmatesoft.svn.core.wc.SVNStatus;
import org.tmatesoft.svn.core.wc.SVNStatusType;
import org.tmatesoft.svn.core.wc2.SvnTarget;
import java.io.DataInput;
import java.io.DataOutput;
import java.io.File;
import java.io.IOException;
import java.util.*;
@@ -59,6 +67,9 @@ import java.util.*;
* @author yole
*/
public class SvnCommittedChangesProvider implements CachingCommittedChangesProvider<SvnChangeList, ChangeBrowserSettings> {
private final static Logger LOG = Logger.getInstance(SvnCommittedChangesProvider.class);
private final Project myProject;
private final SvnVcs myVcs;
private final MessageBusConnection myConnection;
@@ -106,7 +117,7 @@ public class SvnCommittedChangesProvider implements CachingCommittedChangesProvi
@Nullable
public RepositoryLocation getLocationFor(final FilePath root) {
final String url = SvnUtil.getExactLocation(myVcs, root.getIOFile());
return url == null ? null : new SvnRepositoryLocation(url);
return url == null ? null : new SvnRepositoryLocation(url, root);
}
public RepositoryLocation getLocationFor(final FilePath root, final String repositoryPath) {
@@ -128,7 +139,7 @@ public class SvnCommittedChangesProvider implements CachingCommittedChangesProvi
final String repositoryRoot = getRepositoryRoot(svnLocation);
final ChangeBrowserSettings.Filter filter = settings.createFilter();
getCommittedChangesImpl(settings, svnLocation, new String[]{""}, maxCount, new Consumer<SVNLogEntry>() {
getCommittedChangesImpl(settings, svnLocation, maxCount, new Consumer<SVNLogEntry>() {
public void consume(final SVNLogEntry svnLogEntry) {
final SvnChangeList cl = new SvnChangeList(myVcs, svnLocation, svnLogEntry, repositoryRoot);
if (filter.accepts(cl)) {
@@ -147,7 +158,7 @@ public class SvnCommittedChangesProvider implements CachingCommittedChangesProvi
final ArrayList<SvnChangeList> result = new ArrayList<SvnChangeList>();
final String repositoryRoot = getRepositoryRoot(svnLocation);
getCommittedChangesImpl(settings, svnLocation, new String[]{""}, maxCount, new Consumer<SVNLogEntry>() {
getCommittedChangesImpl(settings, svnLocation, maxCount, new Consumer<SVNLogEntry>() {
public void consume(final SVNLogEntry svnLogEntry) {
result.add(new SvnChangeList(myVcs, svnLocation, svnLogEntry, repositoryRoot));
}
@@ -174,7 +185,7 @@ public class SvnCommittedChangesProvider implements CachingCommittedChangesProvi
}
});
getCommittedChangesImpl(settings, svnLocation, new String[]{""}, maxCount, new Consumer<SVNLogEntry>() {
getCommittedChangesImpl(settings, svnLocation, maxCount, new Consumer<SVNLogEntry>() {
public void consume(final SVNLogEntry svnLogEntry) {
try {
mergeSourceTracker.consume(svnLogEntry);
@@ -190,99 +201,46 @@ public class SvnCommittedChangesProvider implements CachingCommittedChangesProvi
}
private String getRepositoryRoot(@NotNull SvnRepositoryLocation svnLocation) throws VcsException {
// TODO: Implement this with command line
final String repositoryRoot;
SVNRepository repository = null;
// TODO: Additionally SvnRepositoryLocation could possibly be refactored to always contain FilePath (or similar local item)
// TODO: So here we could get repository url without performing remote svn command
SVNURL rootUrl;
try {
repository = myVcs.createRepository(svnLocation.getURL());
repositoryRoot = repository.getRepositoryRoot(true).toString();
}
catch (SVNException e) {
throw new VcsException(e);
} finally {
if (repository != null) {
repository.closeSession();
}
}
return repositoryRoot;
}
private void getCommittedChangesImpl(ChangeBrowserSettings settings, final SvnRepositoryLocation location, final String[] filterUrls,
final int maxCount, final Consumer<SVNLogEntry> resultConsumer, final boolean includeMergedRevisions,
final boolean filterOutByDate) throws VcsException {
setCollectingChangesProgress(location);
try {
final String author = settings.getUserFilter();
final Date dateFrom = settings.getDateAfterFilter();
final Long changeFrom = settings.getChangeAfterFilter();
final Date dateTo = settings.getDateBeforeFilter();
final Long changeTo = settings.getChangeBeforeFilter();
final SVNRevision revisionBefore = createRevisionBefore(location, dateTo, changeTo);
final SVNRevision revisionAfter = createRevisionAfter(dateFrom, changeFrom);
// TODO: Implement this with command line
SVNLogClient logger = myVcs.createLogClient();
logger.doLog(location.toSvnUrl(), filterUrls, revisionBefore, revisionBefore, revisionAfter, settings.STOP_ON_COPY, true,
includeMergedRevisions, maxCount, null, createLogHandler(resultConsumer, filterOutByDate, author));
}
catch (SVNException e) {
throw new VcsException(e);
}
}
@NotNull
private static SVNRevision createRevisionAfter(@Nullable Date date, @Nullable Long change) throws VcsException {
return createRevision(date, change, new ThrowableComputable<SVNRevision, VcsException>() {
@Override
public SVNRevision compute() throws VcsException {
return SVNRevision.create(1);
}
});
}
@NotNull
private SVNRevision createRevisionBefore(@NotNull final SvnRepositoryLocation location, @Nullable Date date, @Nullable Long change)
throws VcsException {
return createRevision(date, change, new ThrowableComputable<SVNRevision, VcsException>() {
@Override
public SVNRevision compute() throws VcsException {
return getLatestRevision(location);
}
});
}
@NotNull
private SVNRevision getLatestRevision(@NotNull SvnRepositoryLocation location) throws VcsException {
// TODO: Implement this with command line - issue is that if url does not exist, SVNRepository will be created and asked correctly
// TODO: But "svn info -r HEAD" will fail - check if non-existing location could be passed or inteface should be expanded to use
// TODO: peg revisions.
SVNRepository repository = null;
long revision;
try {
repository = myVcs.createRepository(location.getURL());
revision = repository.getLatestRevision();
rootUrl = SvnUtil.getRepositoryRoot(myVcs, svnLocation.toSvnUrl());
}
catch (SVNException e) {
throw new SvnBindException(e);
}
finally {
if (repository != null) {
repository.closeSession();
}
if (rootUrl == null) {
throw new SvnBindException("Could not resolve repository root url for " + svnLocation);
}
return SVNRevision.create(revision);
return rootUrl.toDecodedString();
}
private void getCommittedChangesImpl(ChangeBrowserSettings settings, final SvnRepositoryLocation location,
final int maxCount, final Consumer<SVNLogEntry> resultConsumer, final boolean includeMergedRevisions,
final boolean filterOutByDate) throws VcsException {
setCollectingChangesProgress(location);
String author = settings.getUserFilter();
Date dateFrom = settings.getDateAfterFilter();
Long changeFrom = settings.getChangeAfterFilter();
Date dateTo = settings.getDateBeforeFilter();
Long changeTo = settings.getChangeBeforeFilter();
SVNRevision revisionBefore = createRevision(dateTo, changeTo, SVNRevision.HEAD);
SVNRevision revisionAfter = createRevision(dateFrom, changeFrom, SVNRevision.create(1));
SvnTarget target = SvnTarget.fromURL(location.toSvnUrl(), revisionBefore);
myVcs.getFactory(target).createHistoryClient().doLog(target, revisionBefore, revisionAfter, settings.STOP_ON_COPY, true,
includeMergedRevisions, maxCount, null,
createLogHandler(resultConsumer, filterOutByDate, author));
}
@NotNull
private static SVNRevision createRevision(@Nullable Date date,
@Nullable Long change,
@NotNull ThrowableComputable<SVNRevision, VcsException> defaultValue)
private static SVNRevision createRevision(@Nullable Date date, @Nullable Long change, @NotNull SVNRevision defaultValue)
throws VcsException {
final SVNRevision result;
@@ -293,7 +251,7 @@ public class SvnCommittedChangesProvider implements CachingCommittedChangesProvi
result = SVNRevision.create(change.longValue());
}
else {
result = defaultValue.compute();
result = defaultValue;
}
return result;
@@ -398,12 +356,56 @@ public class SvnCommittedChangesProvider implements CachingCommittedChangesProvi
return true;
}
public Collection<FilePath> getIncomingFiles(final RepositoryLocation location) {
// TODO: Implement this using "svn status -u" or probably use this command in other part of cache logic
// TODO: How to map RepositoryLocation to concrete working copy ???
// TODO: Seems that another parameter identifying local copy with for which we're detecting if repository location contains
// TODO: incoming files.
return null;
@Nullable
public Collection<FilePath> getIncomingFiles(final RepositoryLocation location) throws VcsException {
FilePath root = null;
if (Registry.is("svn.use.incoming.optimization")) {
root = ((SvnRepositoryLocation)location).getRoot();
if (root == null) {
LOG.info("Working copy root is not provided for repository location " + location);
}
}
return root != null ? getIncomingFiles(root) : null;
}
@NotNull
private Collection<FilePath> getIncomingFiles(@NotNull FilePath root) throws SvnBindException {
// TODO: "svn diff -r BASE:HEAD --xml --summarize" command is also suitable here and outputs only necessary changed files,
// TODO: while "svn status -u" also outputs other files which could be not modified on server. But for svn 1.7 "--xml --summarize"
// TODO: could only be used with url targets - so we could not use "svn diff" here now for all cases (we could not use url with
// TODO: concrete revision as there could be mixed revision working copy).
final Set<FilePath> result = ContainerUtil.newHashSet();
File rootFile = root.getIOFile();
try {
myVcs.getFactory(rootFile).createStatusClient()
.doStatus(rootFile, SVNRevision.UNDEFINED, SVNDepth.INFINITY, true, false, false, false, new ISVNStatusHandler() {
@Override
public void handleStatus(SVNStatus status) throws SVNException {
File file = status.getFile();
boolean changedOnServer = isNotNone(status.getRemoteContentsStatus()) ||
isNotNone(status.getRemoteNodeStatus()) ||
isNotNone(status.getRemotePropertiesStatus());
if (file != null && changedOnServer) {
result.add(VcsUtil.getFilePath(file, file.isDirectory()));
}
}
}, null);
}
catch (SVNException e) {
throw new SvnBindException(e);
}
return result;
}
private static boolean isNotNone(@Nullable SVNStatusType status) {
return status != null && !SVNStatusType.STATUS_NONE.equals(status);
}
public boolean refreshCacheByNumber() {
@@ -33,10 +33,17 @@ import java.io.File;
* @author yole
*/
public class SvnRepositoryLocation implements RepositoryLocation {
private final String myURL;
public SvnRepositoryLocation(final String URL) {
myURL = URL;
private final String myURL;
@Nullable private final FilePath myRoot;
public SvnRepositoryLocation(final String url) {
this(url, null);
}
public SvnRepositoryLocation(String url, @Nullable FilePath root) {
myURL = url;
myRoot = root;
}
public String toString() {
@@ -55,6 +62,11 @@ public class SvnRepositoryLocation implements RepositoryLocation {
return myURL;
}
@Nullable
public FilePath getRoot() {
return myRoot;
}
@Override
public void onBeforeBatch() throws VcsException {
}
@@ -67,7 +67,7 @@ public class HtmlAttributeValueGetter extends XmlAttributeValueGetter {
"section", "subsection", "appendix", "help", "bookmark", "script", "import"};
}
else if ("media".equals(name)) {
return new String[]{"screen", "tty", "tv", "projection", "handheld", "print", "all", "aural", "braille"};
return new String[]{ "all", "braille", "embossed", "handheld", "print", "projection", "screen", "speech", "tty", "tv" };
}
else if ("language".equals(name)) {
return new String[]{"JavaScript", "VBScript", "JScript", "JavaScript1.2", "JavaScript1.3", "JavaScript1.4", "JavaScript1.5"};
@@ -76,16 +76,14 @@ public class HtmlAttributeValueGetter extends XmlAttributeValueGetter {
return new String[]{"text/css", "text/html", "text/plain", "text/xml"};
}
else if ("http-equiv".equals(name) && "meta".equals(tagName)) {
return new String[]{"Accept", "Accept-Charset", "Accept-Encoding", "Accept-Language", "Accept-Ranges", "Age", "Allow",
"Authorization", "Cache-Control", "Connection", "Content-Encoding", "Content-Language", "Content-Length", "Content-Location",
"Content-MD5", "Content-Range", "Content-Type", "Date", "ETag", "Expect", "Expires", "From", "Host", "If-Match",
"If-Modified-Since", "If-None-Match", "If-Range", "If-Unmodified-Since", "Last-Modified", "Location", "Max-Forwards", "Pragma",
"Proxy-Authenticate", "Proxy-Authorization", "Range", "Referer", "Refresh", "Retry-After", "Server", "TE", "Trailer", "Transfer-Encoding",
"Upgrade", "User-Agent", "Vary", "Via", "Warning", "WWW-Authenticate"};
return HtmlUtil.RFC2616_HEADERS;
}
else if("content".equals(name) && "meta".equals(tagName) && getAttribute(tag, "name") == null) {
return HtmlUtil.CONTENT_TYPES;
}
else if ("accept".equals(name) && "input".equals(tagName)) {
return HtmlUtil.CONTENT_TYPES;
}
else if("accept-charset".equals(name) || "charset".equals(name)) {
Charset[] charSets = CharsetToolkit.getAvailableCharsets();
String[] names = new String[charSets.length];
@@ -49,6 +49,7 @@ import com.intellij.xml.XmlElementDescriptor;
import com.intellij.xml.XmlNSDescriptor;
import com.intellij.xml.impl.schema.XmlAttributeDescriptorImpl;
import com.intellij.xml.impl.schema.XmlElementDescriptorImpl;
import com.intellij.xml.util.documentation.MimeTypeDictionary;
import com.intellij.xml.util.documentation.HtmlDescriptorsTable;
import gnu.trove.THashMap;
import gnu.trove.THashSet;
@@ -75,35 +76,18 @@ public class HtmlUtil {
public static final String SCRIPT_TAG_NAME = "script";
public static final String[] CONTENT_TYPES =
{"application/activemessage", "application/andrew-inset", "application/applefile", "application/atomicmail", "application/dca-rft",
"application/dec-dx", "application/mac-binhex40"
, "application/mac-compactpro", "application/macwriteii", "application/msword", "application/news-message-id",
"application/news-transmission", "application/octet-stream"
, "application/oda", "application/pdf", "application/postscript", "application/powerpoint", "application/remote-printing",
"application/rtf"
, "application/slate", "application/wita", "application/wordperfect5.1", "application/x-bcpio", "application/x-cdlink",
"application/x-compress"
, "application/x-cpio", "application/x-csh", "application/x-director", "application/x-dvi", "application/x-gtar", "application/x-gzip"
, "application/x-hdf", "application/x-httpd-cgi", "application/x-koan", "application/x-latex", "application/x-mif",
"application/x-netcdf"
, "application/x-sh", "application/x-shar", "application/x-stuffit", "application/x-sv4cpio", "application/x-sv4crc",
"application/x-tar"
, "application/x-tcl", "application/x-tex", "application/x-texinfo", "application/x-troff", "application/x-troff-man",
"application/x-troff-me"
, "application/x-troff-ms", "application/x-ustar", "application/x-wais-source", "application/zip", "audio/basic", "audio/mpeg"
, "audio/x-aiff", "audio/x-pn-realaudio", "audio/x-pn-realaudio-plugin", "audio/x-realaudio", "audio/x-wav", "chemical/x-pdb"
, "image/gif", "image/ief", "image/jpeg", "image/png", "image/tiff", "image/x-cmu-raster"
, "image/x-portable-anymap", "image/x-portable-bitmap", "image/x-portable-graymap", "image/x-portable-pixmap", "image/x-rgb",
"image/x-xbitmap"
, "image/x-xpixmap", "image/x-xwindowdump", "message/external-body", "message/news", "message/partial", "message/rfc822"
, "multipart/alternative", "multipart/appledouble", "multipart/digest", "multipart/mixed", "multipart/parallel", "text/html"
, "text/plain", "text/richtext", "text/tab-separated-values", "text/x-setext", "text/x-sgml", "video/mpeg"
, "video/quicktime", "video/x-msvideo", "video/x-sgi-movie", "x-conference/x-cooltalk", "x-world/x-vrml"};
public static final String[] CONTENT_TYPES = ArrayUtil.toStringArray(MimeTypeDictionary.getContentTypes());
@NonNls public static final String MATH_ML_NAMESPACE = "http://www.w3.org/1998/Math/MathML";
@NonNls public static final String SVG_NAMESPACE = "http://www.w3.org/2000/svg";
public static final String[] RFC2616_HEADERS = new String[]{"Accept", "Accept-Charset", "Accept-Encoding", "Accept-Language",
"Accept-Ranges", "Age", "Allow", "Authorization", "Cache-Control", "Connection", "Content-Encoding", "Content-Language",
"Content-Length", "Content-Location", "Content-MD5", "Content-Range", "Content-Type", "Date", "ETag", "Expect", "Expires", "From",
"Host", "If-Match", "If-Modified-Since", "If-None-Match", "If-Range", "If-Unmodified-Since", "Last-Modified", "Location",
"Max-Forwards", "Pragma", "Proxy-Authenticate", "Proxy-Authorization", "Range", "Referer", "Refresh", "Retry-After", "Server", "TE",
"Trailer", "Transfer-Encoding", "Upgrade", "User-Agent", "Vary", "Via", "Warning", "WWW-Authenticate"};
private HtmlUtil() {
}
@@ -0,0 +1,75 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.intellij.xml.util.documentation;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.util.io.FileUtil;
import com.intellij.openapi.util.text.StringUtil;
import java.io.IOException;
import java.io.InputStream;
import java.util.Collection;
import java.util.Set;
import java.util.TreeSet;
/**
* @author Dennis.Ushakov
*/
public class MimeTypeDictionary {
private static Set<String> ourContentTypes;
public static Collection<String> getContentTypes() {
if (ourContentTypes == null) {
ourContentTypes = loadContentTypes();
}
return ourContentTypes;
}
private static Set<String> loadContentTypes() {
final TreeSet<String> result = new TreeSet<String>();
result.add("*/*");
// IANA Media Types: http://www.iana.org/assignments/media-types/media-types.xhtml
readMediaTypes(result, "application");
readMediaTypes(result, "audio");
readMediaTypes(result, "image");
readMediaTypes(result, "message");
readMediaTypes(result, "model");
readMediaTypes(result, "multipart");
readMediaTypes(result, "text");
readMediaTypes(result, "video");
return result;
}
private static void readMediaTypes(TreeSet<String> result, final String category) {
final InputStream stream = MimeTypeDictionary.class.getResourceAsStream("mimeTypes/" + category + ".csv");
String csv = "";
try {
csv = stream != null ? FileUtil.loadTextAndClose(stream) : "";
}
catch (IOException e) {
Logger.getInstance(MimeTypeDictionary.class).error(e);
}
final String[] lines = StringUtil.splitByLines(csv);
for (String line : lines) {
if (line == lines[0]) continue;
final String[] split = line.split(",");
if (split.length > 1) {
result.add(!split[1].isEmpty() ? split[1] : category + "/" + split[0]);
}
}
}
}
@@ -0,0 +1,141 @@
Name,Template,Reference
1d-interleaved-parityfec,,[RFC6015]
32kadpcm,,[RFC3802][RFC2421]
3gpp,,[RFC3839][RFC6381]
3gpp2,,[RFC4393][RFC6381]
ac3,,[RFC4184]
AMR,,[RFC4867]
AMR-WB,,[RFC4867]
amr-wb,,[RFC4352]
asc,,[RFC6295]
ATRAC-ADVANCED-LOSSLESS,,[RFC5584]
ATRAC-X,,[RFC5584]
ATRAC3,,[RFC5584]
basic,,[RFC2045][RFC2046]
BV16,,[RFC4298]
BV32,,[RFC4298]
clearmode,,[RFC4040]
CN,,[RFC3389]
DAT12,,[RFC3190]
dls,,[RFC4613]
dsr-es201108,,[RFC3557]
dsr-es202050,,[RFC4060]
dsr-es202211,,[RFC4060]
dsr-es202212,,[RFC4060]
DV,,[RFC6469]
DVI4,,[RFC4856]
eac3,,[RFC4598]
encaprtp,audio/encaprtp,[RFC6849]
EVRC,,[RFC4788]
EVRC-QCP,,[RFC3625]
EVRC0,,[RFC4788]
EVRC1,,[RFC4788]
EVRCB,,[RFC5188]
EVRCB0,,[RFC5188]
EVRCB1,,[RFC4788]
EVRCNW,audio/EVRCNW,[RFC6884]
EVRCNW0,audio/EVRCNW0,[RFC6884]
EVRCNW1,audio/EVRCNW1,[RFC6884]
EVRCWB,,[RFC5188]
EVRCWB0,,[RFC5188]
EVRCWB1,,[RFC5188]
example,,[RFC4735]
fwdred,,[RFC6354]
G719,,"[RFC5404][RFC Errata
3245]"
G722,,[RFC4856]
G7221,,[RFC5577]
G723,,[RFC4856]
G726-16,,[RFC4856]
G726-24,,[RFC4856]
G726-32,,[RFC4856]
G726-40,,[RFC4856]
G728,,[RFC4856]
G729,,[RFC4856]
G7291,,[RFC4749][RFC5459]
G729D,,[RFC4856]
G729E,,[RFC4856]
GSM,,[RFC4856]
GSM-EFR,,[RFC4856]
GSM-HR-08,,[RFC5993]
iLBC,,[RFC3952]
ip-mr_v2.5,,[RFC6262]
L8,,[RFC4856]
L16,,[RFC4856]
L20,,[RFC3190]
L24,,[RFC3190]
LPC,,[RFC4856]
mobile-xmf,,[RFC4723]
MPA,,[RFC3555]
mp4,,[RFC4337][RFC6381]
MP4A-LATM,,[RFC6416]
mpa-robust,,[RFC5219]
mpeg,,[RFC3003]
mpeg4-generic,,[RFC3640][RFC5691][RFC6295]
ogg,,[RFC5334]
parityfec,,[RFC5109]
PCMA,,[RFC4856]
PCMA-WB,,[RFC5391]
PCMU,,[RFC4856]
PCMU-WB,,[RFC5391]
prs.sid,audio/prs.sid,[Linus_Walleij]
QCELP,,[RFC3555][RFC3625]
raptorfec,,[RFC6682]
RED,,[RFC3555]
rtp-enc-aescm128,audio/rtp-enc-aescm128,[ThreeGPP]
rtploopback,audio/rtploopback,[RFC6849]
rtp-midi,,[RFC6295]
rtx,,[RFC4588]
SMV,,[RFC3558]
SMV0,,[RFC3558]
SMV-QCP,,[RFC3625]
sp-midi,audio/sp-midi,[Timo_Kosonen][Tom_White]
speex,,[RFC5574]
t140c,,[RFC4351]
t38,,[RFC4612]
telephone-event,,[RFC4733]
tone,,[RFC4733]
UEMCLIP,,[RFC5686]
ulpfec,,[RFC5109]
VDVI,,[RFC4856]
VMR-WB,,[RFC4348][RFC4424]
vnd.3gpp.iufp,audio/vnd.3gpp.iufp,[Thomas_Belling]
vnd.4SB,audio/vnd.4SB,[Serge_De_Jaham]
vnd.audiokoz,audio/vnd.audiokoz,[Vicki_DeBarros]
vnd.CELP,audio/vnd.CELP,[Serge_De_Jaham]
vnd.cisco.nse,audio/vnd.cisco.nse,[Rajesh_Kumar]
vnd.cmles.radio-events,audio/vnd.cmles.radio-events,[Jean-Philippe_Goulet]
vnd.cns.anp1,audio/vnd.cns.anp1,[Ann_McLaughlin]
vnd.cns.inf1,audio/vnd.cns.inf1,[Ann_McLaughlin]
vnd.dece.audio,audio/vnd.dece.audio,[Michael_A_Dolan]
vnd.digital-winds,audio/vnd.digital-winds,[Armands_Strazds]
vnd.dlna.adts,audio/vnd.dlna.adts,[Edwin_Heredia]
vnd.dolby.heaac.1,audio/vnd.dolby.heaac.1,[Steve_Hattersley]
vnd.dolby.heaac.2,audio/vnd.dolby.heaac.2,[Steve_Hattersley]
vnd.dolby.mlp,audio/vnd.dolby.mlp,[Mike_Ward]
vnd.dolby.mps,audio/vnd.dolby.mps,[Steve_Hattersley]
vnd.dolby.pl2,audio/vnd.dolby.pl2,[Steve_Hattersley]
vnd.dolby.pl2x,audio/vnd.dolby.pl2x,[Steve_Hattersley]
vnd.dolby.pl2z,audio/vnd.dolby.pl2z,[Steve_Hattersley]
vnd.dolby.pulse.1,audio/vnd.dolby.pulse.1,[Steve_Hattersley]
vnd.dra,audio/vnd.dra,[Jiang_Tian]
vnd.dts,audio/vnd.dts,[William_Zou]
vnd.dts.hd,audio/vnd.dts.hd,[William_Zou]
vnd.dvb.file,audio/vnd.dvb.file,[Peter_Siebert]
vnd.everad.plj,audio/vnd.everad.plj,[Shay_Cicelsky]
vnd.hns.audio,audio/vnd.hns.audio,[Swaminathan]
vnd.lucent.voice,audio/vnd.lucent.voice,[Greg_Vaudreuil]
vnd.ms-playready.media.pya,audio/vnd.ms-playready.media.pya,[Steve_DiAcetis]
vnd.nokia.mobile-xmf,audio/vnd.nokia.mobile-xmf,[Nokia]
vnd.nortel.vbk,audio/vnd.nortel.vbk,[Glenn_Parsons]
vnd.nuera.ecelp4800,audio/vnd.nuera.ecelp4800,[Michael_Fox]
vnd.nuera.ecelp7470,audio/vnd.nuera.ecelp7470,[Michael_Fox]
vnd.nuera.ecelp9600,audio/vnd.nuera.ecelp9600,[Michael_Fox]
vnd.octel.sbc,audio/vnd.octel.sbc,[Greg_Vaudreuil]
vnd.qcelp - DEPRECATED - Please see: audio/qcelp,audio/vnd.qcelp,[RFC3625]
vnd.rhetorex.32kadpcm,audio/vnd.rhetorex.32kadpcm,[Greg_Vaudreuil]
vnd.rip,audio/vnd.rip,[Martin_Dawe]
vnd.sealedmedia.softseal.mpeg,audio/vnd.sealedmedia.softseal-mpeg,[David_Petersen]
vnd.vmx.cvsd,audio/vnd.vmx.cvsd,[Greg_Vaudreuil]
vorbis,,[RFC5215]
vorbis-config,,[RFC5215]
1 Name Template Reference
2 1d-interleaved-parityfec [RFC6015]
3 32kadpcm [RFC3802][RFC2421]
4 3gpp [RFC3839][RFC6381]
5 3gpp2 [RFC4393][RFC6381]
6 ac3 [RFC4184]
7 AMR [RFC4867]
8 AMR-WB [RFC4867]
9 amr-wb [RFC4352]
10 asc [RFC6295]
11 ATRAC-ADVANCED-LOSSLESS [RFC5584]
12 ATRAC-X [RFC5584]
13 ATRAC3 [RFC5584]
14 basic [RFC2045][RFC2046]
15 BV16 [RFC4298]
16 BV32 [RFC4298]
17 clearmode [RFC4040]
18 CN [RFC3389]
19 DAT12 [RFC3190]
20 dls [RFC4613]
21 dsr-es201108 [RFC3557]
22 dsr-es202050 [RFC4060]
23 dsr-es202211 [RFC4060]
24 dsr-es202212 [RFC4060]
25 DV [RFC6469]
26 DVI4 [RFC4856]
27 eac3 [RFC4598]
28 encaprtp audio/encaprtp [RFC6849]
29 EVRC [RFC4788]
30 EVRC-QCP [RFC3625]
31 EVRC0 [RFC4788]
32 EVRC1 [RFC4788]
33 EVRCB [RFC5188]
34 EVRCB0 [RFC5188]
35 EVRCB1 [RFC4788]
36 EVRCNW audio/EVRCNW [RFC6884]
37 EVRCNW0 audio/EVRCNW0 [RFC6884]
38 EVRCNW1 audio/EVRCNW1 [RFC6884]
39 EVRCWB [RFC5188]
40 EVRCWB0 [RFC5188]
41 EVRCWB1 [RFC5188]
42 example [RFC4735]
43 fwdred [RFC6354]
44 G719 [RFC5404][RFC Errata 3245]
45 G722 [RFC4856]
46 G7221 [RFC5577]
47 G723 [RFC4856]
48 G726-16 [RFC4856]
49 G726-24 [RFC4856]
50 G726-32 [RFC4856]
51 G726-40 [RFC4856]
52 G728 [RFC4856]
53 G729 [RFC4856]
54 G7291 [RFC4749][RFC5459]
55 G729D [RFC4856]
56 G729E [RFC4856]
57 GSM [RFC4856]
58 GSM-EFR [RFC4856]
59 GSM-HR-08 [RFC5993]
60 iLBC [RFC3952]
61 ip-mr_v2.5 [RFC6262]
62 L8 [RFC4856]
63 L16 [RFC4856]
64 L20 [RFC3190]
65 L24 [RFC3190]
66 LPC [RFC4856]
67 mobile-xmf [RFC4723]
68 MPA [RFC3555]
69 mp4 [RFC4337][RFC6381]
70 MP4A-LATM [RFC6416]
71 mpa-robust [RFC5219]
72 mpeg [RFC3003]
73 mpeg4-generic [RFC3640][RFC5691][RFC6295]
74 ogg [RFC5334]
75 parityfec [RFC5109]
76 PCMA [RFC4856]
77 PCMA-WB [RFC5391]
78 PCMU [RFC4856]
79 PCMU-WB [RFC5391]
80 prs.sid audio/prs.sid [Linus_Walleij]
81 QCELP [RFC3555][RFC3625]
82 raptorfec [RFC6682]
83 RED [RFC3555]
84 rtp-enc-aescm128 audio/rtp-enc-aescm128 [ThreeGPP]
85 rtploopback audio/rtploopback [RFC6849]
86 rtp-midi [RFC6295]
87 rtx [RFC4588]
88 SMV [RFC3558]
89 SMV0 [RFC3558]
90 SMV-QCP [RFC3625]
91 sp-midi audio/sp-midi [Timo_Kosonen][Tom_White]
92 speex [RFC5574]
93 t140c [RFC4351]
94 t38 [RFC4612]
95 telephone-event [RFC4733]
96 tone [RFC4733]
97 UEMCLIP [RFC5686]
98 ulpfec [RFC5109]
99 VDVI [RFC4856]
100 VMR-WB [RFC4348][RFC4424]
101 vnd.3gpp.iufp audio/vnd.3gpp.iufp [Thomas_Belling]
102 vnd.4SB audio/vnd.4SB [Serge_De_Jaham]
103 vnd.audiokoz audio/vnd.audiokoz [Vicki_DeBarros]
104 vnd.CELP audio/vnd.CELP [Serge_De_Jaham]
105 vnd.cisco.nse audio/vnd.cisco.nse [Rajesh_Kumar]
106 vnd.cmles.radio-events audio/vnd.cmles.radio-events [Jean-Philippe_Goulet]
107 vnd.cns.anp1 audio/vnd.cns.anp1 [Ann_McLaughlin]
108 vnd.cns.inf1 audio/vnd.cns.inf1 [Ann_McLaughlin]
109 vnd.dece.audio audio/vnd.dece.audio [Michael_A_Dolan]
110 vnd.digital-winds audio/vnd.digital-winds [Armands_Strazds]
111 vnd.dlna.adts audio/vnd.dlna.adts [Edwin_Heredia]
112 vnd.dolby.heaac.1 audio/vnd.dolby.heaac.1 [Steve_Hattersley]
113 vnd.dolby.heaac.2 audio/vnd.dolby.heaac.2 [Steve_Hattersley]
114 vnd.dolby.mlp audio/vnd.dolby.mlp [Mike_Ward]
115 vnd.dolby.mps audio/vnd.dolby.mps [Steve_Hattersley]
116 vnd.dolby.pl2 audio/vnd.dolby.pl2 [Steve_Hattersley]
117 vnd.dolby.pl2x audio/vnd.dolby.pl2x [Steve_Hattersley]
118 vnd.dolby.pl2z audio/vnd.dolby.pl2z [Steve_Hattersley]
119 vnd.dolby.pulse.1 audio/vnd.dolby.pulse.1 [Steve_Hattersley]
120 vnd.dra audio/vnd.dra [Jiang_Tian]
121 vnd.dts audio/vnd.dts [William_Zou]
122 vnd.dts.hd audio/vnd.dts.hd [William_Zou]
123 vnd.dvb.file audio/vnd.dvb.file [Peter_Siebert]
124 vnd.everad.plj audio/vnd.everad.plj [Shay_Cicelsky]
125 vnd.hns.audio audio/vnd.hns.audio [Swaminathan]
126 vnd.lucent.voice audio/vnd.lucent.voice [Greg_Vaudreuil]
127 vnd.ms-playready.media.pya audio/vnd.ms-playready.media.pya [Steve_DiAcetis]
128 vnd.nokia.mobile-xmf audio/vnd.nokia.mobile-xmf [Nokia]
129 vnd.nortel.vbk audio/vnd.nortel.vbk [Glenn_Parsons]
130 vnd.nuera.ecelp4800 audio/vnd.nuera.ecelp4800 [Michael_Fox]
131 vnd.nuera.ecelp7470 audio/vnd.nuera.ecelp7470 [Michael_Fox]
132 vnd.nuera.ecelp9600 audio/vnd.nuera.ecelp9600 [Michael_Fox]
133 vnd.octel.sbc audio/vnd.octel.sbc [Greg_Vaudreuil]
134 vnd.qcelp - DEPRECATED - Please see: audio/qcelp audio/vnd.qcelp [RFC3625]
135 vnd.rhetorex.32kadpcm audio/vnd.rhetorex.32kadpcm [Greg_Vaudreuil]
136 vnd.rip audio/vnd.rip [Martin_Dawe]
137 vnd.sealedmedia.softseal.mpeg audio/vnd.sealedmedia.softseal-mpeg [David_Petersen]
138 vnd.vmx.cvsd audio/vnd.vmx.cvsd [Greg_Vaudreuil]
139 vorbis [RFC5215]
140 vorbis-config [RFC5215]
@@ -0,0 +1,46 @@
Name,Template,Description,Reference
cgm,image/cgm,Computer Graphics Metafile,[Alan_Francis]
example,,,[RFC4735]
fits,,,[RFC4047]
g3fax,,,[RFC1494]
gif,,,[RFC2045][RFC2046]
ief,,Image Exchange Format,[RFC1314]
jp2,image/jp2,,[RFC3745]
jpeg,,,[RFC2045][RFC2046]
jpm,image/jpm,,[RFC3745]
jpx,image/jpx,,[RFC3745]
ktx,,,[Mark_Callow][Khronos][http://www.khronos.org/opengles/sdk/tools/KTX/file_format_spec/#mimeregistration]
naplps,image/naplps,,[Ilya_Ferber]
png,image/png,,[Glenn_Randers-Pehrson]
prs.btif,image/prs.btif,,[Ben_Simon]
prs.pti,image/prs.pti,,[Juern_Laun]
pwg-raster,image/pwg-raster,,[Michael_Sweet]
svg+xml,,,[W3C][http://www.w3.org/TR/SVG/mimereg.html]
t38,,,[RFC3362]
tiff,,Tag Image File Format,[RFC3302]
tiff-fx,,Tag Image File Format Fax eXtended,[RFC3950]
vnd.adobe.photoshop,image/vnd.adobe.photoshop,,[Kim_Scarborough]
vnd.airzip.accelerator.azv,image/vnd.airzip.accelerator.azv,,[Gary_Clueit]
vnd.cns.inf2,image/vnd.cns.inf2,,[Ann_McLaughlin]
vnd.dece.graphic,image/vnd.dece.graphic,,[Michael_A_Dolan]
vnd.djvu,image/vnd-djvu,,[Leon_Bottou]
vnd.dwg,image/vnd.dwg,,[Jodi_Moline]
vnd.dxf,image/vnd.dxf,,[Jodi_Moline]
vnd.dvb.subtitle,image/vnd.dvb.subtitle,,[Peter_Siebert][Michael_Lagally]
vnd.fastbidsheet,image/vnd.fastbidsheet,,[Scott_Becker]
vnd.fpx,image/vnd.fpx,,[Marc_Douglas_Spencer]
vnd.fst,image/vnd.fst,,[Arild_Fuldseth]
vnd.fujixerox.edmics-mmr,image/vnd.fujixerox.edmics-mmr,,[Masanori_Onda]
vnd.fujixerox.edmics-rlc,image/vnd.fujixerox.edmics-rlc,,[Masanori_Onda]
vnd.globalgraphics.pgb,image/vnd.globalgraphics.pgb,,[Martin_Bailey]
vnd.microsoft.icon,image/vnd.microsoft.icon,,[Simon_Butcher]
vnd.mix,image/vnd.mix,,[Saveen_Reddy]
vnd.ms-modi,image/vnd.ms-modi,,[Gregory_Vaughan]
vnd.net-fpx,image/vnd.net-fpx,,[Marc_Douglas_Spencer]
vnd.radiance,image/vnd.radiance,,[Randolph_Fritz][Greg_Ward]
vnd.sealed.png,image/vnd.sealed-png,,[David_Petersen]
vnd.sealedmedia.softseal.gif,image/vnd.sealedmedia.softseal-gif,,[David_Petersen]
vnd.sealedmedia.softseal.jpg,image/vnd.sealedmedia.softseal-jpg,,[David_Petersen]
vnd.svf,image/vnd-svf,,[Jodi_Moline]
vnd.wap.wbmp,image/vnd-wap-wbmp,,[Peter_Stark]
vnd.xiff,image/vnd.xiff,,[Steven_Martin]
1 Name Template Description Reference
2 cgm image/cgm Computer Graphics Metafile [Alan_Francis]
3 example [RFC4735]
4 fits [RFC4047]
5 g3fax [RFC1494]
6 gif [RFC2045][RFC2046]
7 ief Image Exchange Format [RFC1314]
8 jp2 image/jp2 [RFC3745]
9 jpeg [RFC2045][RFC2046]
10 jpm image/jpm [RFC3745]
11 jpx image/jpx [RFC3745]
12 ktx [Mark_Callow][Khronos][http://www.khronos.org/opengles/sdk/tools/KTX/file_format_spec/#mimeregistration]
13 naplps image/naplps [Ilya_Ferber]
14 png image/png [Glenn_Randers-Pehrson]
15 prs.btif image/prs.btif [Ben_Simon]
16 prs.pti image/prs.pti [Juern_Laun]
17 pwg-raster image/pwg-raster [Michael_Sweet]
18 svg+xml [W3C][http://www.w3.org/TR/SVG/mimereg.html]
19 t38 [RFC3362]
20 tiff Tag Image File Format [RFC3302]
21 tiff-fx Tag Image File Format Fax eXtended [RFC3950]
22 vnd.adobe.photoshop image/vnd.adobe.photoshop [Kim_Scarborough]
23 vnd.airzip.accelerator.azv image/vnd.airzip.accelerator.azv [Gary_Clueit]
24 vnd.cns.inf2 image/vnd.cns.inf2 [Ann_McLaughlin]
25 vnd.dece.graphic image/vnd.dece.graphic [Michael_A_Dolan]
26 vnd.djvu image/vnd-djvu [Leon_Bottou]
27 vnd.dwg image/vnd.dwg [Jodi_Moline]
28 vnd.dxf image/vnd.dxf [Jodi_Moline]
29 vnd.dvb.subtitle image/vnd.dvb.subtitle [Peter_Siebert][Michael_Lagally]
30 vnd.fastbidsheet image/vnd.fastbidsheet [Scott_Becker]
31 vnd.fpx image/vnd.fpx [Marc_Douglas_Spencer]
32 vnd.fst image/vnd.fst [Arild_Fuldseth]
33 vnd.fujixerox.edmics-mmr image/vnd.fujixerox.edmics-mmr [Masanori_Onda]
34 vnd.fujixerox.edmics-rlc image/vnd.fujixerox.edmics-rlc [Masanori_Onda]
35 vnd.globalgraphics.pgb image/vnd.globalgraphics.pgb [Martin_Bailey]
36 vnd.microsoft.icon image/vnd.microsoft.icon [Simon_Butcher]
37 vnd.mix image/vnd.mix [Saveen_Reddy]
38 vnd.ms-modi image/vnd.ms-modi [Gregory_Vaughan]
39 vnd.net-fpx image/vnd.net-fpx [Marc_Douglas_Spencer]
40 vnd.radiance image/vnd.radiance [Randolph_Fritz][Greg_Ward]
41 vnd.sealed.png image/vnd.sealed-png [David_Petersen]
42 vnd.sealedmedia.softseal.gif image/vnd.sealedmedia.softseal-gif [David_Petersen]
43 vnd.sealedmedia.softseal.jpg image/vnd.sealedmedia.softseal-jpg [David_Petersen]
44 vnd.svf image/vnd-svf [Jodi_Moline]
45 vnd.wap.wbmp image/vnd-wap-wbmp [Peter_Stark]
46 vnd.xiff image/vnd.xiff [Steven_Martin]
@@ -0,0 +1,22 @@
Name,Template,Reference
CPIM,,[RFC3862]
delivery-status,,[RFC1894]
disposition-notification,,[RFC3798]
example,,[RFC4735]
external-body,,[RFC2045][RFC2046]
feedback-report,,[RFC5965]
global,,[RFC6532]
global-delivery-status,,[RFC6533]
global-disposition-notification,,[RFC6533]
global-headers,,[RFC6533]
http,message/http,[RFC-ietf-httpbis-p1-messaging-26]
imdn+xml,,[RFC5438]
news - OBSOLETE,message/news,[RFC5537][Henry_Spencer]
partial,,[RFC2045][RFC2046]
rfc822,,[RFC2045][RFC2046]
s-http,,[RFC2660]
sip,,[RFC3261]
sipfrag,,[RFC3420]
tracking-status,,[RFC3886]
vnd.si.simp - OBSOLETE,message/vnd.si.simp,[Nicholas_Parks_Young]
vnd.wfa.wsc,message/vnd.wfa.wsc,[Mick_Conley]
1 Name Template Reference
2 CPIM [RFC3862]
3 delivery-status [RFC1894]
4 disposition-notification [RFC3798]
5 example [RFC4735]
6 external-body [RFC2045][RFC2046]
7 feedback-report [RFC5965]
8 global [RFC6532]
9 global-delivery-status [RFC6533]
10 global-disposition-notification [RFC6533]
11 global-headers [RFC6533]
12 http message/http [RFC-ietf-httpbis-p1-messaging-26]
13 imdn+xml [RFC5438]
14 news - OBSOLETE message/news [RFC5537][Henry_Spencer]
15 partial [RFC2045][RFC2046]
16 rfc822 [RFC2045][RFC2046]
17 s-http [RFC2660]
18 sip [RFC3261]
19 sipfrag [RFC3420]
20 tracking-status [RFC3886]
21 vnd.si.simp - OBSOLETE message/vnd.si.simp [Nicholas_Parks_Young]
22 vnd.wfa.wsc message/vnd.wfa.wsc [Mick_Conley]
@@ -0,0 +1,18 @@
Name,Template,Reference
example,,[RFC4735]
iges,model/iges,[Curtis_Parks]
mesh,,[RFC2077]
vnd.collada+xml,model/vnd.collada+xml,[James_Riordon]
vnd.dwf,model/vnd-dwf,[Jason_Pratt]
vnd.flatland.3dml,model/vnd.flatland.3dml,[Michael_Powers]
vnd.gdl,model/vnd.gdl,[Attila_Babits]
vnd.gs-gdl,model/vnd.gs-gdl,[Attila_Babits]
vnd.gtw,model/vnd.gtw,[Yutaka_Ozaki]
vnd.moml+xml,model/vnd.moml+xml,[Christopher_Brooks]
vnd.mts,model/vnd.mts,[Boris_Rabinovitch]
vnd.parasolid.transmit.binary,model/vnd.parasolid.transmit-binary,[Parasolid]
vnd.parasolid.transmit.text,model/vnd.parasolid.transmit-text,[Parasolid]
vnd.vtu,model/vnd.vtu,[Boris_Rabinovitch]
vrml,,[RFC2077]
x3d-vrml,model/x3d-vrml,[Web3D][Web3DX3D]
x3d+xml,model/x3d+xml,[Web3D][Web3DX3D]
1 Name Template Reference
2 example [RFC4735]
3 iges model/iges [Curtis_Parks]
4 mesh [RFC2077]
5 vnd.collada+xml model/vnd.collada+xml [James_Riordon]
6 vnd.dwf model/vnd-dwf [Jason_Pratt]
7 vnd.flatland.3dml model/vnd.flatland.3dml [Michael_Powers]
8 vnd.gdl model/vnd.gdl [Attila_Babits]
9 vnd.gs-gdl model/vnd.gs-gdl [Attila_Babits]
10 vnd.gtw model/vnd.gtw [Yutaka_Ozaki]
11 vnd.moml+xml model/vnd.moml+xml [Christopher_Brooks]
12 vnd.mts model/vnd.mts [Boris_Rabinovitch]
13 vnd.parasolid.transmit.binary model/vnd.parasolid.transmit-binary [Parasolid]
14 vnd.parasolid.transmit.text model/vnd.parasolid.transmit-text [Parasolid]
15 vnd.vtu model/vnd.vtu [Boris_Rabinovitch]
16 vrml [RFC2077]
17 x3d-vrml model/x3d-vrml [Web3D][Web3DX3D]
18 x3d+xml model/x3d+xml [Web3D][Web3DX3D]
@@ -0,0 +1,15 @@
Name,Template,Reference
alternative,,[RFC2045][RFC2046]
appledouble,multipart/appledouble,[Patrik_Faltstrom]
byteranges,multipart/byteranges,[RFC-ietf-httpbis-p5-range-26]
digest,,[RFC2045][RFC2046]
encrypted,,[RFC1847]
example,,[RFC4735]
form-data,,[RFC2388]
header-set,multipart/header-set,[Dave_Crocker]
mixed,,[RFC2045][RFC2046]
parallel,,[RFC2045][RFC2046]
related,,[RFC2387]
report,,[RFC6522]
signed,,[RFC1847]
voice-message,,[RFC2421][RFC2423]
1 Name Template Reference
2 alternative [RFC2045][RFC2046]
3 appledouble multipart/appledouble [Patrik_Faltstrom]
4 byteranges multipart/byteranges [RFC-ietf-httpbis-p5-range-26]
5 digest [RFC2045][RFC2046]
6 encrypted [RFC1847]
7 example [RFC4735]
8 form-data [RFC2388]
9 header-set multipart/header-set [Dave_Crocker]
10 mixed [RFC2045][RFC2046]
11 parallel [RFC2045][RFC2046]
12 related [RFC2387]
13 report [RFC6522]
14 signed [RFC1847]
15 voice-message [RFC2421][RFC2423]
@@ -0,0 +1,68 @@
Name,Template,Reference
1d-interleaved-parityfec,,[RFC6015]
calendar,,[RFC5545]
css,,[RFC2318]
csv,text/csv,[RFC4180][RFC7111]
directory - DEPRECATED - Please see:,,[RFC2425][RFC6350]
dns,,[RFC4027]
ecmascript - OBSOLETE,,[RFC4329]
encaprtp,text/encaprtp,[RFC6849]
enriched,,[RFC1896]
example,,[RFC4735]
fwdred,,[RFC6354]
grammar-ref-list,,[RFC6787]
html,text/html,[Michael_TM_Smith][W3C]
javascript - OBSOLETE,,[RFC4329]
jcr-cnd,text/jcr-cnd,[Peeter_Piegaze]
mizar,text/mizar,[Jesse_Alama]
n3,text/n3,[Eric_Prudhommeaux][W3C]
parameters,text/parameters,[RFC-ietf-mmusic-rfc2326bis-40]
parityfec,,[RFC5109]
plain,,[RFC2046][RFC3676][RFC5147]
provenance-notation,,[Ivan_Herman][W3C]
prs.fallenstein.rst,text/prs.fallenstein.rst,[Benja_Fallenstein]
prs.lines.tag,text/prs.lines.tag,[John_Lines]
raptorfec,,[RFC6682]
RED,,[RFC4102]
rfc822-headers,,[RFC6522]
richtext,,[RFC2045][RFC2046]
rtf,text/rtf,[Paul_Lindner]
rtp-enc-aescm128,text/rtp-enc-aescm128,[ThreeGPP]
rtploopback,text/rtploopback,[RFC6849]
rtx,,[RFC4588]
sgml,,[RFC1874]
t140,,[RFC4103]
tab-separated-values,text/tab-separated-values,[Paul_Lindner]
troff,,[RFC4263]
turtle,text/turtle,[Eric_Prudhommeaux][W3C]
ulpfec,,[RFC5109]
uri-list,,[RFC2483]
vcard,,[RFC6350]
vnd.a,text/vnd-a,[Regis_Dehoux]
vnd.abc,text/vnd.abc,[Steve_Allen]
vnd.curl,text/vnd-curl,[Robert_Byrnes]
vnd.debian.copyright,text/vnd.debian.copyright,[Charles_Plessy]
vnd.DMClientScript,text/vnd.DMClientScript,[Dan_Bradley]
vnd.dvb.subtitle,text/vnd.dvb.subtitle,[Peter_Siebert][Michael_Lagally]
vnd.esmertec.theme-descriptor,text/vnd.esmertec.theme-descriptor,[Stefan_Eilemann]
vnd.fly,text/vnd.fly,[John-Mark_Gurney]
vnd.fmi.flexstor,text/vnd.fmi.flexstor,[Kari_E._Hurtta]
vnd.graphviz,text/vnd.graphviz,[John_Ellson]
vnd.in3d.3dml,text/vnd.in3d.3dml,[Michael_Powers]
vnd.in3d.spot,text/vnd.in3d.spot,[Michael_Powers]
vnd.IPTC.NewsML,text/vnd.IPTC.NewsML,[IPTC]
vnd.IPTC.NITF,text/vnd.IPTC.NITF,[IPTC]
vnd.latex-z,text/vnd.latex-z,[Mikusiak_Lubos]
vnd.motorola.reflex,text/vnd.motorola.reflex,[Mark_Patton]
vnd.ms-mediapackage,text/vnd.ms-mediapackage,[Jan_Nelson]
vnd.net2phone.commcenter.command,text/vnd.net2phone.commcenter.command,[Feiyu_Xie]
vnd.radisys.msml-basic-layout,,[RFC5707]
vnd.si.uricatalogue - OBSOLETE,text/vnd.si.uricatalogue,[Nicholas_Parks_Young]
vnd.sun.j2me.app-descriptor,text/vnd.sun.j2me.app-descriptor,[Gary_Adams]
vnd.trolltech.linguist,text/vnd.trolltech.linguist,[David_Lee_Lambert]
vnd.wap.si,text/vnd.wap.si,[WAP-Forum]
vnd.wap.sl,text/vnd.wap.sl,[WAP-Forum]
vnd.wap.wml,text/vnd.wap-wml,[Peter_Stark]
vnd.wap.wmlscript,text/vnd.wap.wmlscript,[Peter_Stark]
xml,,[RFC3023]
xml-external-parsed-entity,,[RFC3023]
1 Name Template Reference
2 1d-interleaved-parityfec [RFC6015]
3 calendar [RFC5545]
4 css [RFC2318]
5 csv text/csv [RFC4180][RFC7111]
6 directory - DEPRECATED - Please see: [RFC2425][RFC6350]
7 dns [RFC4027]
8 ecmascript - OBSOLETE [RFC4329]
9 encaprtp text/encaprtp [RFC6849]
10 enriched [RFC1896]
11 example [RFC4735]
12 fwdred [RFC6354]
13 grammar-ref-list [RFC6787]
14 html text/html [Michael_TM_Smith][W3C]
15 javascript - OBSOLETE [RFC4329]
16 jcr-cnd text/jcr-cnd [Peeter_Piegaze]
17 mizar text/mizar [Jesse_Alama]
18 n3 text/n3 [Eric_Prudhommeaux][W3C]
19 parameters text/parameters [RFC-ietf-mmusic-rfc2326bis-40]
20 parityfec [RFC5109]
21 plain [RFC2046][RFC3676][RFC5147]
22 provenance-notation [Ivan_Herman][W3C]
23 prs.fallenstein.rst text/prs.fallenstein.rst [Benja_Fallenstein]
24 prs.lines.tag text/prs.lines.tag [John_Lines]
25 raptorfec [RFC6682]
26 RED [RFC4102]
27 rfc822-headers [RFC6522]
28 richtext [RFC2045][RFC2046]
29 rtf text/rtf [Paul_Lindner]
30 rtp-enc-aescm128 text/rtp-enc-aescm128 [ThreeGPP]
31 rtploopback text/rtploopback [RFC6849]
32 rtx [RFC4588]
33 sgml [RFC1874]
34 t140 [RFC4103]
35 tab-separated-values text/tab-separated-values [Paul_Lindner]
36 troff [RFC4263]
37 turtle text/turtle [Eric_Prudhommeaux][W3C]
38 ulpfec [RFC5109]
39 uri-list [RFC2483]
40 vcard [RFC6350]
41 vnd.a text/vnd-a [Regis_Dehoux]
42 vnd.abc text/vnd.abc [Steve_Allen]
43 vnd.curl text/vnd-curl [Robert_Byrnes]
44 vnd.debian.copyright text/vnd.debian.copyright [Charles_Plessy]
45 vnd.DMClientScript text/vnd.DMClientScript [Dan_Bradley]
46 vnd.dvb.subtitle text/vnd.dvb.subtitle [Peter_Siebert][Michael_Lagally]
47 vnd.esmertec.theme-descriptor text/vnd.esmertec.theme-descriptor [Stefan_Eilemann]
48 vnd.fly text/vnd.fly [John-Mark_Gurney]
49 vnd.fmi.flexstor text/vnd.fmi.flexstor [Kari_E._Hurtta]
50 vnd.graphviz text/vnd.graphviz [John_Ellson]
51 vnd.in3d.3dml text/vnd.in3d.3dml [Michael_Powers]
52 vnd.in3d.spot text/vnd.in3d.spot [Michael_Powers]
53 vnd.IPTC.NewsML text/vnd.IPTC.NewsML [IPTC]
54 vnd.IPTC.NITF text/vnd.IPTC.NITF [IPTC]
55 vnd.latex-z text/vnd.latex-z [Mikusiak_Lubos]
56 vnd.motorola.reflex text/vnd.motorola.reflex [Mark_Patton]
57 vnd.ms-mediapackage text/vnd.ms-mediapackage [Jan_Nelson]
58 vnd.net2phone.commcenter.command text/vnd.net2phone.commcenter.command [Feiyu_Xie]
59 vnd.radisys.msml-basic-layout [RFC5707]
60 vnd.si.uricatalogue - OBSOLETE text/vnd.si.uricatalogue [Nicholas_Parks_Young]
61 vnd.sun.j2me.app-descriptor text/vnd.sun.j2me.app-descriptor [Gary_Adams]
62 vnd.trolltech.linguist text/vnd.trolltech.linguist [David_Lee_Lambert]
63 vnd.wap.si text/vnd.wap.si [WAP-Forum]
64 vnd.wap.sl text/vnd.wap.sl [WAP-Forum]
65 vnd.wap.wml text/vnd.wap-wml [Peter_Stark]
66 vnd.wap.wmlscript text/vnd.wap.wmlscript [Peter_Stark]
67 xml [RFC3023]
68 xml-external-parsed-entity [RFC3023]
@@ -0,0 +1,77 @@
Name,Template,Reference
1d-interleaved-parityfec,,[RFC6015]
3gpp,,[RFC3839][RFC6381]
3gpp2,,[RFC4393][RFC6381]
3gpp-tt,,[RFC4396]
BMPEG,,[RFC3555]
BT656,,[RFC3555]
CelB,,[RFC3555]
DV,,[RFC6469]
encaprtp,video/encaprtp,[RFC6849]
example,,[RFC4735]
H261,,[RFC4587]
H263,,[RFC3555]
H263-1998,,[RFC4629]
H263-2000,,[RFC4629]
H264,,[RFC6184]
H264-RCDO,,[RFC6185]
H264-SVC,,[RFC6190]
iso.segment,video/iso.segment,[David_Singer][ISO-IEC_JTC1]
JPEG,,[RFC3555]
jpeg2000,,[RFC5371][RFC5372]
MJ2,,[RFC3745]
MP1S,,[RFC3555]
MP2P,,[RFC3555]
MP2T,,[RFC3555]
mp4,,[RFC4337][RFC6381]
MP4V-ES,,[RFC6416]
MPV,,[RFC3555]
mpeg,,[RFC2045][RFC2046]
mpeg4-generic,,[RFC3640]
nv,,[RFC4856]
ogg,,[RFC5334]
parityfec,,[RFC5109]
pointer,,[RFC2862]
quicktime,video/quicktime,[RFC6381][Paul_Lindner]
raptorfec,,[RFC6682]
raw,,[RFC4175]
rtp-enc-aescm128,video/rtp-enc-aescm128,[ThreeGPP]
rtploopback,video/rtploopback,[RFC6849]
rtx,,[RFC4588]
SMPTE292M,,[RFC3497]
ulpfec,,[RFC5109]
vc1,,[RFC4425]
vnd.CCTV,video/vnd.CCTV,[http://www.iana.org/assignments/contact-people.htmll#Rottmann]
vnd.dece.hd,video/vnd.dece.hd,[http://www.iana.org/assignments/contact-people.htmll#Dolan]
vnd.dece.mobile,video/vnd.dece.mobile,[http://www.iana.org/assignments/contact-people.htmll#Dolan]
vnd.dece.mp4,video/vnd.dece-mp4,[http://www.iana.org/assignments/contact-people.htmll#Dolan]
vnd.dece.pd,video/vnd.dece.pd,[http://www.iana.org/assignments/contact-people.htmll#Dolan]
vnd.dece.sd,video/vnd.dece.sd,[http://www.iana.org/assignments/contact-people.htmll#Dolan]
vnd.dece.video,video/vnd.dece.video,[http://www.iana.org/assignments/contact-people.htmll#Dolan]
vnd.directv.mpeg,video/vnd.directv-mpeg,[Nathan_Zerbe]
vnd.directv.mpeg-tts,video/vnd.directv.mpeg-tts,[Nathan_Zerbe]
vnd.dlna.mpeg-tts,video/vnd.dlna.mpeg-tts,[Edwin_Heredia]
vnd.dvb.file,video/vnd.dvb.file,[Peter_Siebert][Kevin_Murray]
vnd.fvt,video/vnd.fvt,[Arild_Fuldseth]
vnd.hns.video,video/vnd.hns.video,[Swaminathan]
vnd.iptvforum.1dparityfec-1010,video/vnd.iptvforum.1dparityfec-1010,[Shuji_Nakamura]
vnd.iptvforum.1dparityfec-2005,video/vnd.iptvforum.1dparityfec-2005,[Shuji_Nakamura]
vnd.iptvforum.2dparityfec-1010,video/vnd.iptvforum.2dparityfec-1010,[Shuji_Nakamura]
vnd.iptvforum.2dparityfec-2005,video/vnd.iptvforum.2dparityfec-2005,[Shuji_Nakamura]
vnd.iptvforum.ttsavc,video/vnd.iptvforum.ttsavc,[Shuji_Nakamura]
vnd.iptvforum.ttsmpeg2,video/vnd.iptvforum.ttsmpeg2,[Shuji_Nakamura]
vnd.motorola.video,video/vnd.motorola.video,[Tom_McGinty]
vnd.motorola.videop,video/vnd.motorola.videop,[Tom_McGinty]
vnd.mpegurl,video/vnd-mpegurl,[Heiko_Recktenwald]
vnd.ms-playready.media.pyv,video/vnd.ms-playready.media.pyv,[Steve_DiAcetis]
vnd.nokia.interleaved-multimedia,video/vnd.nokia.interleaved-multimedia,[Petteri_Kangaslampi]
vnd.nokia.videovoip,video/vnd.nokia.videovoip,[Nokia]
vnd.objectvideo,video/vnd.objectvideo,[John_Clark]
vnd.radgamettools.bink,video/vnd.radgamettools.bink,[Henrik_Andersson]
vnd.radgamettools.smacker,video/vnd.radgamettools.smacker,[Henrik_Andersson]
vnd.sealed.mpeg1,video/vnd.sealed.mpeg1,[David_Petersen]
vnd.sealed.mpeg4,video/vnd.sealed.mpeg4,[David_Petersen]
vnd.sealed.swf,video/vnd.sealed-swf,[David_Petersen]
vnd.sealedmedia.softseal.mov,video/vnd.sealedmedia.softseal-mov,[David_Petersen]
vnd.uvvu.mp4,video/vnd.uvvu-mp4,[http://www.iana.org/assignments/contact-people.htmll#Dolan]
vnd.vivo,video/vnd-vivo,[John_Wolfe]
1 Name Template Reference
2 1d-interleaved-parityfec [RFC6015]
3 3gpp [RFC3839][RFC6381]
4 3gpp2 [RFC4393][RFC6381]
5 3gpp-tt [RFC4396]
6 BMPEG [RFC3555]
7 BT656 [RFC3555]
8 CelB [RFC3555]
9 DV [RFC6469]
10 encaprtp video/encaprtp [RFC6849]
11 example [RFC4735]
12 H261 [RFC4587]
13 H263 [RFC3555]
14 H263-1998 [RFC4629]
15 H263-2000 [RFC4629]
16 H264 [RFC6184]
17 H264-RCDO [RFC6185]
18 H264-SVC [RFC6190]
19 iso.segment video/iso.segment [David_Singer][ISO-IEC_JTC1]
20 JPEG [RFC3555]
21 jpeg2000 [RFC5371][RFC5372]
22 MJ2 [RFC3745]
23 MP1S [RFC3555]
24 MP2P [RFC3555]
25 MP2T [RFC3555]
26 mp4 [RFC4337][RFC6381]
27 MP4V-ES [RFC6416]
28 MPV [RFC3555]
29 mpeg [RFC2045][RFC2046]
30 mpeg4-generic [RFC3640]
31 nv [RFC4856]
32 ogg [RFC5334]
33 parityfec [RFC5109]
34 pointer [RFC2862]
35 quicktime video/quicktime [RFC6381][Paul_Lindner]
36 raptorfec [RFC6682]
37 raw [RFC4175]
38 rtp-enc-aescm128 video/rtp-enc-aescm128 [ThreeGPP]
39 rtploopback video/rtploopback [RFC6849]
40 rtx [RFC4588]
41 SMPTE292M [RFC3497]
42 ulpfec [RFC5109]
43 vc1 [RFC4425]
44 vnd.CCTV video/vnd.CCTV [http://www.iana.org/assignments/contact-people.htmll#Rottmann]
45 vnd.dece.hd video/vnd.dece.hd [http://www.iana.org/assignments/contact-people.htmll#Dolan]
46 vnd.dece.mobile video/vnd.dece.mobile [http://www.iana.org/assignments/contact-people.htmll#Dolan]
47 vnd.dece.mp4 video/vnd.dece-mp4 [http://www.iana.org/assignments/contact-people.htmll#Dolan]
48 vnd.dece.pd video/vnd.dece.pd [http://www.iana.org/assignments/contact-people.htmll#Dolan]
49 vnd.dece.sd video/vnd.dece.sd [http://www.iana.org/assignments/contact-people.htmll#Dolan]
50 vnd.dece.video video/vnd.dece.video [http://www.iana.org/assignments/contact-people.htmll#Dolan]
51 vnd.directv.mpeg video/vnd.directv-mpeg [Nathan_Zerbe]
52 vnd.directv.mpeg-tts video/vnd.directv.mpeg-tts [Nathan_Zerbe]
53 vnd.dlna.mpeg-tts video/vnd.dlna.mpeg-tts [Edwin_Heredia]
54 vnd.dvb.file video/vnd.dvb.file [Peter_Siebert][Kevin_Murray]
55 vnd.fvt video/vnd.fvt [Arild_Fuldseth]
56 vnd.hns.video video/vnd.hns.video [Swaminathan]
57 vnd.iptvforum.1dparityfec-1010 video/vnd.iptvforum.1dparityfec-1010 [Shuji_Nakamura]
58 vnd.iptvforum.1dparityfec-2005 video/vnd.iptvforum.1dparityfec-2005 [Shuji_Nakamura]
59 vnd.iptvforum.2dparityfec-1010 video/vnd.iptvforum.2dparityfec-1010 [Shuji_Nakamura]
60 vnd.iptvforum.2dparityfec-2005 video/vnd.iptvforum.2dparityfec-2005 [Shuji_Nakamura]
61 vnd.iptvforum.ttsavc video/vnd.iptvforum.ttsavc [Shuji_Nakamura]
62 vnd.iptvforum.ttsmpeg2 video/vnd.iptvforum.ttsmpeg2 [Shuji_Nakamura]
63 vnd.motorola.video video/vnd.motorola.video [Tom_McGinty]
64 vnd.motorola.videop video/vnd.motorola.videop [Tom_McGinty]
65 vnd.mpegurl video/vnd-mpegurl [Heiko_Recktenwald]
66 vnd.ms-playready.media.pyv video/vnd.ms-playready.media.pyv [Steve_DiAcetis]
67 vnd.nokia.interleaved-multimedia video/vnd.nokia.interleaved-multimedia [Petteri_Kangaslampi]
68 vnd.nokia.videovoip video/vnd.nokia.videovoip [Nokia]
69 vnd.objectvideo video/vnd.objectvideo [John_Clark]
70 vnd.radgamettools.bink video/vnd.radgamettools.bink [Henrik_Andersson]
71 vnd.radgamettools.smacker video/vnd.radgamettools.smacker [Henrik_Andersson]
72 vnd.sealed.mpeg1 video/vnd.sealed.mpeg1 [David_Petersen]
73 vnd.sealed.mpeg4 video/vnd.sealed.mpeg4 [David_Petersen]
74 vnd.sealed.swf video/vnd.sealed-swf [David_Petersen]
75 vnd.sealedmedia.softseal.mov video/vnd.sealedmedia.softseal-mov [David_Petersen]
76 vnd.uvvu.mp4 video/vnd.uvvu-mp4 [http://www.iana.org/assignments/contact-people.htmll#Dolan]
77 vnd.vivo video/vnd-vivo [John_Wolfe]